mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Android: Fix initial start from shortcut.
Fixes #10855. We have to wait for the permission request to complete.
This commit is contained in:
1 parent
0d677fff87
commit
895de164ed
3 files changed
+42
-3
No files matched your search
+9
-3
@@ -444,11 +444,16 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
||||
ILOG("Boot filename found in args: '%s'", argv[i]);
|
||||
|
||||
bool okToLoad = true;
|
||||
bool okToCheck = true;
|
||||
if (System_GetPropertyBool(SYSPROP_SUPPORTS_PERMISSIONS)) {
|
||||
PermissionStatus status = System_GetPermissionStatus(SYSTEM_PERMISSION_STORAGE);
|
||||
if (status != PERMISSION_STATUS_GRANTED) {
|
||||
ELOG("Storage permission not granted. Launching without argument.");
|
||||
if (status == PERMISSION_STATUS_DENIED) {
|
||||
ELOG("Storage permission denied. Launching without argument.");
|
||||
okToLoad = false;
|
||||
okToCheck = false;
|
||||
} else if (status != PERMISSION_STATUS_GRANTED) {
|
||||
ELOG("Storage permission not granted. Launching without argument check.");
|
||||
okToCheck = false;
|
||||
} else {
|
||||
ILOG("Storage permission granted.");
|
||||
}
|
||||
@@ -459,7 +464,8 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
|
||||
boot_filename = ReplaceAll(boot_filename, "\\", "/");
|
||||
#endif
|
||||
skipLogo = true;
|
||||
|
||||
}
|
||||
if (okToLoad && okToCheck) {
|
||||
std::unique_ptr<FileLoader> fileLoader(ConstructFileLoader(boot_filename));
|
||||
if (!fileLoader->Exists()) {
|
||||
fprintf(stderr, "File not found: %s\n", boot_filename.c_str());
|
||||
|
||||
Reference in new issue
Block a user