The International Simutrans Forum

 

Author Topic: [r8637] about SDL_WINDOW_ALLOW_HIGHDPI  (Read 167 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 271
  • Languages: JP,EN
[r8637] about SDL_WINDOW_ALLOW_HIGHDPI
« 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.


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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9313
  • Languages: De,EN,JP
Re: [r8637] about SDL_WINDOW_ALLOW_HIGHDPI
« Reply #1 on: December 01, 2018, 02:48:43 PM »
I added it in r8640. I hope it will not change anything on windows.