mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Android: Apply command-line options again after the storage permission config reload
The reload reset them, so options passed through the Args extra (like --pause-menu-exit) were lost before the game even started. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ae4b7983aa
commit
f19ed3b2db
1 file changed
+5
@@ -209,6 +209,8 @@ static std::string g_savedAchievementsHost;
|
||||
static bool g_savedAchievementsHardcoreMode = false;
|
||||
static bool g_hasSavedAchievementsSettings = false;
|
||||
static bool g_nativeMainThreadReady = false;
|
||||
// Kept to apply again after a config reload.
|
||||
static CommandLineOptions g_cmdLineOptions;
|
||||
|
||||
static std::mutex g_inputEventQueueLock;
|
||||
static std::vector<QueuedEvent> g_inputEventQueue;
|
||||
@@ -693,6 +695,7 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO
|
||||
|
||||
// Apply parsed command line options to config.
|
||||
cmdLineOptions.ApplyToConfig();
|
||||
g_cmdLineOptions = cmdLineOptions;
|
||||
|
||||
boot_filename.clear();
|
||||
if (boot_filename.empty() && cmdLineOptions.bootVSH.value_or(false)) {
|
||||
@@ -1435,6 +1438,8 @@ bool HandleGlobalMessage(UIMessage message, const std::string &value) {
|
||||
INFO_LOG(Log::IO, "Reloading config after storage permission grant.");
|
||||
g_Config.Reload();
|
||||
PostLoadConfig();
|
||||
// The reload reset what the command line set.
|
||||
g_cmdLineOptions.ApplyToConfig();
|
||||
g_Config.iGPUBackend = gpuBackend;
|
||||
return true;
|
||||
} else if (message == UIMessage::APP_RESUMED || message == UIMessage::GOT_FOCUS) {
|
||||
|
||||
Reference in new issue
Block a user