1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

code review

This commit is contained in:
Laserlicht
2025-09-03 20:58:30 +02:00
parent 0847485345
commit aada2eccf7
6 changed files with 17 additions and 14 deletions

View File

@@ -117,15 +117,15 @@ MainWindow * getMainWindow()
}
void keepScreenOn(bool on)
void keepScreenOn(bool isEnabled)
{
#if defined(VCMI_ANDROID)
QtAndroid::runOnAndroidThread([on]
QtAndroid::runOnAndroidThread([isEnabled]
{
QtAndroid::androidActivity().callMethod<void>("setScreensaverEnabled", "(Z)V", !on);
QtAndroid::androidActivity().callMethod<void>("keepScreenOn", "(Z)V", isEnabled);
});
#elif defined(VCMI_IOS)
iOS_utils::setScreensaverEnabled(!on);
iOS_utils::keepScreenOn(isEnabled);
#endif
}
}