mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-10 13:28:28 +00:00
Backends: SDL2, SDL3, Win32: don't submit monitor with 0 DpiScale (e.g. accessibility virtual monitor?). to prevent assert. (#7902)
I am not too confident on this but I believe pushing this is the fastest way we will get feedback.
This commit is contained in:
@@ -907,7 +907,7 @@ static void ImGui_ImplGlfw_UpdateMonitors()
|
||||
float x_scale, y_scale;
|
||||
glfwGetMonitorContentScale(glfw_monitors[n], &x_scale, &y_scale);
|
||||
if (x_scale == 0.0f)
|
||||
continue; // Some accessibility applications are declaring fake monitors with a DPI of 0, see (#7902)
|
||||
continue; // Some accessibility applications are declaring virtual monitors with a DPI of 0, see #7902.
|
||||
monitor.DpiScale = x_scale;
|
||||
#endif
|
||||
monitor.PlatformHandle = (void*)glfw_monitors[n]; // [...] GLFW doc states: "guaranteed to be valid only until the monitor configuration changes"
|
||||
|
Reference in New Issue
Block a user