prevent screensaver on android

This commit is contained in:
Green Sky 2024-06-04 19:05:35 +02:00
parent 56f1bf559c
commit ef4e0d0857
No known key found for this signature in database

View File

@ -30,9 +30,11 @@ int main(int argc, char** argv) {
#endif
// setup hints
#ifndef __ANDROID__
if (SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1") != SDL_TRUE) {
std::cerr << "Failed to set '" << SDL_HINT_VIDEO_ALLOW_SCREENSAVER << "' to 1\n";
}
#endif
auto last_time_render = std::chrono::steady_clock::now();
auto last_time_tick = std::chrono::steady_clock::now();