mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-25 20:58:29 +00:00
Backends: SDL2: Fixed build for Emscripten and SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE=0 platforms.
Amend e06b5df
.
This commit is contained in:
@@ -667,6 +667,7 @@ static void ImGui_ImplSDL2_UpdateMouseData()
|
||||
SDL_Window* focused_window = SDL_GetKeyboardFocus();
|
||||
const bool is_app_focused = (bd->Window == focused_window);
|
||||
#else
|
||||
SDL_Window* focused_window = bd->Window;
|
||||
const bool is_app_focused = (SDL_GetWindowFlags(bd->Window) & SDL_WINDOW_INPUT_FOCUS) != 0; // SDL 2.0.3 and non-windowed systems: single-viewport only
|
||||
#endif
|
||||
if (is_app_focused)
|
||||
|
Reference in New Issue
Block a user