Undo removal of force close button in-game (#6823)

Reverts commit 19dc51f (cleanup: remove unneeded menu entry)

Even if it closes when swiping away the app, there are cases where you
cannot swipe it away, or even bring up the navigation bar.
This commit is contained in:
alexytomi
2025-04-14 05:11:27 +08:00
committed by GitHub
parent 7c9c076105
commit dcc2b95f54
2 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package net.kdt.pojavlaunch;
import static net.kdt.pojavlaunch.Tools.currentDisplayMetrics;
import static net.kdt.pojavlaunch.Tools.dialogForceClose;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_ENABLE_GYRO;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_SUSTAINED_PERFORMANCE;
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_USE_ALTERNATE_SURFACE;
@@ -190,10 +191,11 @@ public class MainActivity extends BaseActivity implements ControlButtonMenuListe
android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.menu_ingame));
gameActionClickListener = (parent, view, position, id) -> {
switch(position) {
case 0: openLogOutput(); break;
case 1: dialogSendCustomKey(); break;
case 2: openQuickSettings(); break;
case 3: openCustomControls(); break;
case 0: dialogForceClose(MainActivity.this); break;
case 1: openLogOutput(); break;
case 2: dialogSendCustomKey(); break;
case 3: openQuickSettings(); break;
case 4: openCustomControls(); break;
}
drawerLayout.closeDrawers();
};

View File

@@ -27,6 +27,7 @@
</string-array>
<string-array name="menu_ingame">
<item>@string/control_forceclose</item>
<item>@string/control_viewout</item>
<item>@string/control_customkey</item>
<item>@string/quick_setting_title</item>