From f19ed3b2db6da619a71bc0d8ddc44e1b5834afb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 20 Oct 2026 12:27:59 +0200 Subject: [PATCH] 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) --- UI/NativeApp.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index bdfd8a9788..7288921fe5 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -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 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) {