|
@@ -29,6 +29,7 @@
|
|
|
|
|
|
// CHANGELOG
|
|
|
// (minor and older changes stripped away, please see git history for details)
|
|
|
+// 2025-07-08: Made ImGui_ImplGlfw_GetContentScaleForWindow(), ImGui_ImplGlfw_GetContentScaleForMonitor() helpers return 1.0f on Emscripten and Android platforms, matching macOS logic. (#8742, #8733)
|
|
|
// 2025-06-18: Added support for multiple Dear ImGui contexts. (#8676, #8239, #8069)
|
|
|
// 2025-06-11: Added ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window) and ImGui_ImplGlfw_GetContentScaleForMonitor(GLFWmonitor* monitor) helper to facilitate making DPI-aware apps.
|
|
|
// 2025-03-10: Map GLFW_KEY_WORLD_1 and GLFW_KEY_WORLD_2 into ImGuiKey_Oem102.
|
|
@@ -876,7 +877,7 @@ static void ImGui_ImplGlfw_UpdateGamepads()
|
|
|
// - Some accessibility applications are declaring virtual monitors with a DPI of 0.0f, see #7902. We preserve this value for caller to handle.
|
|
|
float ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window)
|
|
|
{
|
|
|
-#if GLFW_HAS_PER_MONITOR_DPI && !defined(__APPLE__)
|
|
|
+#if GLFW_HAS_PER_MONITOR_DPI && !(defined(__APPLE__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__))
|
|
|
float x_scale, y_scale;
|
|
|
glfwGetWindowContentScale(window, &x_scale, &y_scale);
|
|
|
return x_scale;
|
|
@@ -888,7 +889,7 @@ float ImGui_ImplGlfw_GetContentScaleForWindow(GLFWwindow* window)
|
|
|
|
|
|
float ImGui_ImplGlfw_GetContentScaleForMonitor(GLFWmonitor* monitor)
|
|
|
{
|
|
|
-#if GLFW_HAS_PER_MONITOR_DPI && !defined(__APPLE__)
|
|
|
+#if GLFW_HAS_PER_MONITOR_DPI && !(defined(__APPLE__) || defined(__EMSCRIPTEN__) || defined(__ANDROID__))
|
|
|
float x_scale, y_scale;
|
|
|
glfwGetMonitorContentScale(monitor, &x_scale, &y_scale);
|
|
|
return x_scale;
|