shinyquagsire23 / OpenJKDF2

A cross-platform reimplementation of JKDF2 in C
Other
510 stars 42 forks source link

HIDPI support? Wrong resolution choosen with windows scaling set. #264

Closed Havner closed 1 year ago

Havner commented 1 year ago

I get that there is no support for resolution selection. My assumption is that the game chooses your desktop resolution by default and goes with it.

I have a 4K monitor (3840x2160) and I have 200% scaling set in windows 10.

When I start the OpenJKDF2 the game plays in 1920x1080 with a perfect point scaling. When I set the windows scaling to 100% only then the game plays in correct 4K resolution. This to me seems like some issues with HIDPI support. I've noticed that there is a switch in options for that but it doesn't do anything for me. The game behaves the same way (what I described above) regardless of the state of that option.

Also big thanks and kudos for pulling this whole project of. That's quite an achievement!

A working workaround for this issue is to set a compatibility option on openjkdf2 executable (change high DPI settings -> Override high DPI scaling behaviour. Scaling performed by: Application). So I guess it's not that high priority but this indicates that the game is not HIDPI aware despite there being an option that would suggest otherwise.

shinyquagsire23 commented 1 year ago

I believe this will get resolved once #252 gets merged, which I think just applies the workaround behavior using some EXE metadata

Havner commented 1 year ago

Yeah. After I reported this I found #252 and it should fix that. What is the HIDPI in-game option then? What's it supposed to do?

shinyquagsire23 commented 1 year ago

It basically just sets SDL2's HiDPI window flag, which does work as expected on macOS (HiDPI -> native resolution, no HiDPI -> window scaled resolution). Not sure what it does on Linux tbh.

Havner commented 1 year ago

Hmm, I wonder, if the windows executable become HIDPI aware won't that option start to work on windows as well.

shinyquagsire23 commented 1 year ago

Fixed v0.9.0

Havner commented 1 year ago

Confirmed fixed