SFML community forums

Help => Window => Topic started by: azyryanov on July 11, 2018, 11:06:07 am

Title: RenderWindow size with Windows scaling
Post by: azyryanov on July 11, 2018, 11:06:07 am
Hello.

I'm making a game for Windows. When I set Windows scaling to 150%, SFML RenderWindow is not scaled accordingly. Moreover, if I try to run my game in fullscreen mode, it occupies only 2/3 of the screen. Is this a SFML bug, or am I missing something?

I'm using SFML 2.5.0, Windows 10 with latest updates, Nvidia GeForce 970 with recent drivers.
Title: Re: RenderWindow size with Windows scaling
Post by: Mario on July 17, 2018, 09:58:18 am
It's a problem/bug with how SFML announces DPI scaling and (mis-)handles window (re-)sizing. If you've built SFML yourself, look for WindowImpl32.cpp, there's a function setProcessDpiAware(). Make it return on the very first line (basically skipping the remaining code) and see if that fixes the issue or what changes.
Title: Re: RenderWindow size with Windows scaling
Post by: azyryanov on July 17, 2018, 10:04:46 am
Thanks for the tip, it helps.

Does this problem/bug has a Bug ID? Or should I create a new one?
Title: Re: RenderWindow size with Windows scaling
Post by: Mario on July 27, 2018, 09:42:21 am
There's an issue/PR somewhere, can't find it right now, but it's basically a known thing.