High DPI support for macOS (and other OSes?)

Everything about development and the OpenMW source code.
Post Reply
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

High DPI support for macOS (and other OSes?)

Post by corristo »

I started working on a branch to properly support High DPI mode (known as Retina in Apple land) on macOS. I'd like to ask those on Linux & Windows to check if there are any regressions due to my changes.

Here's the branch:

https://github.com/nikolaykasyanov/open ... acos-hidpi

There're two things the branch does at the moment:
  • Asks SDL to create High DPI window (SDL_WINDOW_ALLOW_HIGHDPI)
  • Calculates & propagates scale factor (basically pixels/virtual points ratio, always an integral number on Retina displays) to respective subsystems (i.e. MyGUI, for example GUI scale will be 2.0 on Retina display automatically)
So far it works quite well in windowed mode, but fullscreen is still uses "low" DPI. I also have to verify that moving window from Retina screen to regular one (and vice versa) is handled properly.

I'd also appreciate any info about current state of High DPI support in OpenMW on other OSes. Feel free to ask anything too.

Have a nice weekend!
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: High DPI support for macOS (and other OSes?)

Post by scrawl »

Nice! I've tested your branch and am not seeing any regressions on Linux.
I'd also appreciate any info about current state of High DPI support in OpenMW on other OSes. Feel free to ask anything too.
We might be blocked on changes to SDL. SDL has implemented the HighDPI flags only on OSX, as far as I know.

Current status I'm seeing on Linux/GNOME, the display scale has no effect on the OpenMW window (the window doesn't get bigger, nor does the gui scaling increase). Input works properly.

On Windows, reportedly the input coordinates are messed up when using display scaling ( https://bugs.openmw.org/issues/3107 ). There is a chance your changes would fix that, even if the ALLOW_HIGHDPI flag isn't used by SDL on windows. @Ace, can we get a windows build out for users to test?
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: High DPI support for macOS (and other OSes?)

Post by scrawl »

Any updates on this corristo? Is there anything missing to get the branch integrated?
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: High DPI support for macOS (and other OSes?)

Post by corristo »

Hi @scrawl,

current implementation still doesn't do HiDPI in fullscreen modes, I need a bit more time to deal with that. For the next release, I'd rather tackle https://bugs.openmw.org/issues/3708.
Post Reply