Prevent kge from inhibiting sleep.

This commit is contained in:
2025-12-02 18:43:45 -08:00
parent ae822083c2
commit 87b1e6f502

View File

@@ -77,13 +77,17 @@ GUIFrontend::Init(Editor &ed)
height_ = std::max(200, h);
}
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
window_ = SDL_CreateWindow(
"kge - kyle's graphical editor " KTE_VERSION_STR,
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
width_, height_,
win_flags);
if (!window_)
if (!window_) {
return false;
}
SDL_EnableScreenSaver();
#if defined(__APPLE__)
// macOS: when "fullscreen" is requested, position the window at the