cfillion / reaimgui

ReaScript binding and REAPER backend for the Dear ImGui toolkit.
https://forum.cockos.com/showthread.php?t=250419
GNU Lesser General Public License v3.0
61 stars 9 forks source link

"Unsupported HiDPI mode" error with Windows "System (Enhanced)" DPI scaling #12

Open s0u7h opened 1 year ago

s0u7h commented 1 year ago

Running any ReaImGui script in 0.8.2 or higher, with these two DPI settings, fails with the following ReaImGui backend error message:

Unsupported HiDPI mode: select "Multimonitor aware v2" in Preferences > General > Adavanced UI/system settings.

On my Windows 11 system with two mixed resolution monitors (2160p/1440p), the only settings that scale both REAPERs interface, extensions like HeDa Track Inspector, and VST plugins, is to set the REAPER.exe DPI compatibility to "System (Enhanced)" and REAPERs own HDPI mode in Advanced UI settings to "Multimonitor aware (recommended)". Setting this to "V2 (experimental)" as the error message suggests does cure the ReaImGui issue but reintroduces scaling problems elsewhere in REAPER.

Rolling back to version 0.8.1 solves this issue, so it looks related to this change made in 0.8.2:

I'm not sure if this is blocking the "multi-monitor (recommended)" setting inadvertently or if there is a necessity for v2 to run newer ReaImGui.

Cheers!

cfillion commented 1 year ago

ReaImGui should accept both "Multimonitor aware (recommended)" and "Multimonitor aware v2 (experimental)". Perhaps changing reaper.exe compatibility settings overrides the setting in REAPER preferences or affects it in some way? Does the issue still happen with default .exe compatibility settings?

I will have access to my Windows machine in about a week to check this & see what can be done.

(P.S. It's not a crash if it shows a proper error message and reaper.exe does not unexpectedly quits, losing unsaved data.) (P.S.2 Make sure to restart REAPER after changing its HiDPI mode in Adavanced UI/system settings for the new mode to take effect.)

s0u7h commented 1 year ago

Thanks - indeed not a crash but a Reascript error, sorry for that. It only happens when System (Enhanced) is enabled (with REAPER on the Multimonitor (recommended) setting), and I did try restarting both REAPER and Windows after making changes, with no luck.

Tried with OpenGL and Direct3D backends, which made no difference. Occurs in both 7.0pre2 and 6.75 portable.

The specific errors I'm getting include "...\FX Inspector\fx_inspector_libraries/gui.lua:12: ImGui_PushFont: frame initialization failed", and "...75 dev\Scripts\ReaTeam Extensions\API\ReaImGui_Demo.lua:300: ImGui_SetNextWindowPos: frame initialization failed" in case that's relevant.