mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
(Android) Added creation of a .nomedia file in the ROM directory
This commit is contained in:
parent
be0851a562
commit
8e8f17c1d1
|
@ -504,6 +504,7 @@ void applicationLoop()
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
// Prevent that button presses get registered immediately when entering the
|
// Prevent that button presses get registered immediately when entering the
|
||||||
// foreground (which most commonly mean we're returning from a game).
|
// foreground (which most commonly mean we're returning from a game).
|
||||||
|
// Also perform some other tasks on resume such as resetting timers.
|
||||||
if (event.type == SDL_APP_WILLENTERFOREGROUND) {
|
if (event.type == SDL_APP_WILLENTERFOREGROUND) {
|
||||||
blockInput = true;
|
blockInput = true;
|
||||||
inputBlockTime = 0;
|
inputBlockTime = 0;
|
||||||
|
@ -1076,6 +1077,18 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__ANDROID__)
|
||||||
|
if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) {
|
||||||
|
LOG(LogInfo) << "Creating \"no media\" file \""
|
||||||
|
<< FileData::getROMDirectory() + ".nomedia"
|
||||||
|
<< "\"...";
|
||||||
|
Utils::FileSystem::createEmptyFile(FileData::getROMDirectory() + ".nomedia");
|
||||||
|
if (!Utils::FileSystem::exists(FileData::getROMDirectory() + ".nomedia")) {
|
||||||
|
LOG(LogWarning) << "Couldn't create file, permission problems?";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Generate controller events since we're done loading.
|
// Generate controller events since we're done loading.
|
||||||
SDL_GameControllerEventState(SDL_ENABLE);
|
SDL_GameControllerEventState(SDL_ENABLE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue