projectM-visualizer / frontend-sdl2

Standalone application based on SDL2 that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL2.
GNU General Public License v3.0
62 stars 34 forks source link

Windows - full screen command - sets a lower resolution than native #4

Closed ghost closed 2 years ago

ghost commented 4 years ago

Hello, I am using the latest ProjectM v3.1.3 My OS is Windows 10 Enterprise, AMD video card My display is a 4k TV, native resolution set as 3840x2160, max is 4096x2160 for some reason, I have display scaling at 175%

When I hit Ctrl+F in ProjectM, the resolution is set to 2560x1440

Is it possible to make ProjectM set the resolution that the display currently had just before, rather than look at the monitor's spec and get confused by hi-dpi monitors like this?

milkdropper commented 4 years ago

I am going to assume you are using projectmSDL. I had a friend report the same issue when stretching monitors. It looks like the SDL library is not aware of scaling and it messes up the math, and I could not come up with a solution for stretching. I just asked him to stop scaling when launching projectmSDL.

I can look into if we can at least fix full screen.

milkdropper commented 4 years ago

It looks like it is still an open issue. Can you bump this thread? https://discourse.libsdl.org/t/wip-windows-high-dpi-support/22446/7

ghost commented 4 years ago

Thank you, I appreciate it.

It does indeed appear to follow the "fake" resolution that Windows states to non-scaling programs, as at 200% scaling it uses 1920x1080, at 300% it uses 1280x720

Edit: Found a workaround by disabling program scaling and fullscreen optimisations in the Properties - Compatibility dialog. It now fullscreens at 3840x2160

Edit2: Got it, the SDL runtime doesn't have scaling. I will bump that thread with what I found

Capture

milkdropper commented 4 years ago

Nice one - this fixes the stretching issue as well! Thanks for sharing the workaround.

kblaschke commented 3 years ago

There are issues with fullscreen mode on other platforms as well, mainly boiling down to SDL2 using exclusive fullscreen mode with a change of resolution and maybe even refresh frequency.

IMO we might be better off using SDL_WINDOW_FULLSCREEN_DESKTOP instead, which basically maximizes the window on the current display and removes the border. On macOS, this equals using the native "fullscreen" toggle in the title bar, or the "fullscreen" mode most window managers on Linux provide. SDL2 honors those OS specialties, and it might also fix the current issue on Windows.

revmischa commented 3 years ago

Sure we can try it

kblaschke commented 2 years ago

I'll close this issue, as at least from my tests, using the "fake" fullscreen mode in the rewritten SDL app works perfectly fine on Windows, macOS and Linux. For those who prefer the exclusive mode, there's now a configuration property to enable the old behavior and also additional values to set the wanted fullscreen resolution (the next-best resolution supported by the GPU driver is actually used).