mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-02 13:37:40 -05:00
Backends: GLFW: don't submit monitor with 0 DpiScale (e.g. accessibility virtual monitor?). to prevent assert. (#7902)
This commit is contained in:
@@ -906,6 +906,8 @@ static void ImGui_ImplGlfw_UpdateMonitors()
|
||||
// Warning: the validity of monitor DPI information on Windows depends on the application DPI awareness settings, which generally needs to be set in the manifest or at runtime.
|
||||
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)
|
||||
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