|
@@ -437,6 +437,8 @@ static BOOL CALLBACK ImGui_ImplWin32_UpdateMonitors_EnumFunc(HMONITOR monitor, H
|
|
imgui_monitor.WorkSize = ImVec2((float)(info.rcWork.right - info.rcWork.left), (float)(info.rcWork.bottom - info.rcWork.top));
|
|
imgui_monitor.WorkSize = ImVec2((float)(info.rcWork.right - info.rcWork.left), (float)(info.rcWork.bottom - info.rcWork.top));
|
|
imgui_monitor.DpiScale = ImGui_ImplWin32_GetDpiScaleForMonitor(monitor);
|
|
imgui_monitor.DpiScale = ImGui_ImplWin32_GetDpiScaleForMonitor(monitor);
|
|
imgui_monitor.PlatformHandle = (void*)monitor;
|
|
imgui_monitor.PlatformHandle = (void*)monitor;
|
|
|
|
+ if (imgui_monitor.DpiScale <= 0.0f)
|
|
|
|
+ return TRUE; // Some accessibility applications are declaring virtual monitors with a DPI of 0, see #7902.
|
|
ImGuiPlatformIO& io = ImGui::GetPlatformIO();
|
|
ImGuiPlatformIO& io = ImGui::GetPlatformIO();
|
|
if (info.dwFlags & MONITORINFOF_PRIMARY)
|
|
if (info.dwFlags & MONITORINFOF_PRIMARY)
|
|
io.Monitors.push_front(imgui_monitor);
|
|
io.Monitors.push_front(imgui_monitor);
|