From 5f5bb1f1a31b595085089de194f83dc5f4d33c8b Mon Sep 17 00:00:00 2001 From: Tinyu Date: Mon, 10 Aug 2026 14:25:18 +0800 Subject: [PATCH] bring SDL window to foreground on macOS. --- examples/PlatformIO_SDL/src/sdl_main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/PlatformIO_SDL/src/sdl_main.cpp b/examples/PlatformIO_SDL/src/sdl_main.cpp index 87abf61b..7137e416 100644 --- a/examples/PlatformIO_SDL/src/sdl_main.cpp +++ b/examples/PlatformIO_SDL/src/sdl_main.cpp @@ -17,6 +17,9 @@ int user_func(bool* running) int main(int, char**) { +#if defined(__APPLE__) + SDL_SetHint(SDL_HINT_MAC_BACKGROUND_APP, "0"); +#endif // The second argument is effective for step execution with breakpoints. // You can specify the time in milliseconds to perform slow execution that ensures screen updates. return lgfx::Panel_sdl::main(user_func, 128);