The International Simutrans Forum

Development => Bug Reports => Topic started by: THLeaderH on November 28, 2018, 01:32:45 PM

Title: [r8637] about SDL_WINDOW_ALLOW_HIGHDPI
Post by: THLeaderH on November 28, 2018, 01:32:45 PM
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.
(https://pbs.twimg.com/media/DtFn7LBVsAEbem4.jpg)

Inserting this single line at simsys_s2.cc:L272 solves this issue, at least in my environment.
Code: [Select]
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.
Title: Re: [r8637] about SDL_WINDOW_ALLOW_HIGHDPI
Post by: prissi on December 01, 2018, 02:48:43 PM
I added it in r8640. I hope it will not change anything on windows.