From 0deec0865d0ab214d210d47700d46eead3d7a1e3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 3 Jan 2024 17:33:59 +0100 Subject: [PATCH] (Android) Reverted to requiring full filesystem access for the application --- es-app/src/main.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index 6a65f1890..716e224fb 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -546,10 +546,6 @@ int main(int argc, char* argv[]) std::locale::global(std::locale("C")); -#if defined(__ANDROID__) - Utils::Platform::Android::setDataDirectories(); -#endif - #if defined(__APPLE__) // This is a workaround to disable the incredibly annoying save state functionality in // macOS which forces a restore of the previous window state. The problem is that this @@ -596,19 +592,22 @@ int main(int argc, char* argv[]) } #endif +#if defined(__ANDROID__) + Utils::Platform::Android::requestStoragePermission(); + + while (AndroidVariables::sHold) + SDL_Delay(20); + + Utils::Platform::Android::setDataDirectories(); + Utils::Platform::Android::setROMDirectory(); +#endif + if (!Settings::getInstance()->getBool("DebugFlag") && Settings::getInstance()->getBool("DebugMode")) { Settings::getInstance()->setBool("Debug", true); Log::setReportingLevel(LogDebug); } -#if defined(__ANDROID__) - Utils::Platform::Android::startConfigurator(); - while (AndroidVariables::sHold) - SDL_Delay(20); - Utils::Platform::Android::setROMDirectory(); -#endif - #if defined(FREEIMAGE_LIB) // Call this ONLY when linking with FreeImage as a static library. FreeImage_Initialise();