prevent screensaver on android
Some checks failed
ContinuousDelivery / linux-ubuntu (pull_request) Failing after 4m38s
ContinuousIntegration / linux (pull_request) Successful in 3m41s
ContinuousIntegration / android (pull_request) Failing after 5m37s
ContinuousDelivery / windows (pull_request) Has been cancelled
ContinuousDelivery / windows-asan (pull_request) Has been cancelled
ContinuousIntegration / macos (pull_request) Has been cancelled
ContinuousIntegration / windows (pull_request) Has been cancelled
ContinuousDelivery / release (pull_request) Has been cancelled

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 #endif
// setup hints // setup hints
#ifndef __ANDROID__
if (SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1") != SDL_TRUE) { if (SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1") != SDL_TRUE) {
std::cerr << "Failed to set '" << SDL_HINT_VIDEO_ALLOW_SCREENSAVER << "' to 1\n"; 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_render = std::chrono::steady_clock::now();
auto last_time_tick = std::chrono::steady_clock::now(); auto last_time_tick = std::chrono::steady_clock::now();