mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-19 12:55:34 +00:00
Examples: Win32+OpenGL3: enable DPI awareness. (#9083)
This commit is contained in:
@@ -175,6 +175,7 @@ Other Changes:
|
|||||||
during surface resize. (#8381)
|
during surface resize. (#8381)
|
||||||
- SDL2+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
|
- SDL2+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
|
||||||
- SDL3+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
|
- SDL3+WebGPU: added new example (Emscripten + native Dawn/WGPU). (#8381) [@brutpitt]
|
||||||
|
- Win32+OpenGL3: enable DPI awareness. (#9083)
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
// Make process DPI aware and obtain main monitor scale
|
// Make process DPI aware and obtain main monitor scale
|
||||||
//ImGui_ImplWin32_EnableDpiAwareness(); // FIXME: This somehow doesn't work in the Win32+OpenGL example. Why?
|
ImGui_ImplWin32_EnableDpiAwareness();
|
||||||
float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
|
float main_scale = ImGui_ImplWin32_GetDpiScaleForMonitor(::MonitorFromPoint(POINT{ 0, 0 }, MONITOR_DEFAULTTOPRIMARY));
|
||||||
|
|
||||||
// Create application window
|
// Create application window
|
||||||
|
|||||||
Reference in New Issue
Block a user