mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-23 06:38:58 +00:00
Backends: ensure that ImGuiPlatformMonitor list is available after backend Init call. (#7995)
This commit is contained in:
@@ -520,7 +520,6 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void
|
||||
#else
|
||||
bd->MouseCanReportHoveredViewport = false;
|
||||
#endif
|
||||
bd->WantUpdateMonitors = true;
|
||||
|
||||
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
||||
platform_io.Platform_SetClipboardTextFn = ImGui_ImplSDL2_SetClipboardText;
|
||||
@@ -531,6 +530,9 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void
|
||||
platform_io.Platform_OpenInShellFn = [](ImGuiContext*, const char* url) { ImGui_ImplSDL2_EmscriptenOpenURL(url); return true; };
|
||||
#endif
|
||||
|
||||
// Update monitor a first time during init
|
||||
ImGui_ImplSDL2_UpdateMonitors();
|
||||
|
||||
// Gamepad handling
|
||||
bd->GamepadMode = ImGui_ImplSDL2_GamepadMode_AutoFirst;
|
||||
bd->WantUpdateGamepadsList = true;
|
||||
|
||||
Reference in New Issue
Block a user