News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

[r8637] about SDL_WINDOW_ALLOW_HIGHDPI

Started by THLeaderH, November 28, 2018, 01:32:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

A few weeks ago, I upgraded the operating system to macOS Mojave and reinstalled some libraries, including SDL2. SDL2 version of my computer is 2.0.8. Then, I tried to compile simutrans. Compilation itself succeeded, but graphic scale went wrong like the image below.


Inserting this single line at simsys_s2.cc:L272 solves this issue, at least in my environment.

flags |= SDL_WINDOW_ALLOW_HIGHDPI;


This issue happens only when the window is in Retina Display, a high resolution display of Mac. When the window is in an external display that is not Retina, this issue does not occur. Please note that giving -autodpi option to simutrans does not solve this problem. I don't know the side effects of giving SDL_WINDOW_ALLOW_HIGHDPI flag to SDL_CreateWindow function and whether this issue happens for all mac users or only for me. In my memory, SDL_WINDOW_ALLOW_HIGHDPI was true by default in older versions of SDL2. It seems that SDL2 had set this flag false by default in a version.

prissi

I added it in r8640. I hope it will not change anything on windows.