Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: RenderWindow size with Windows scaling  (Read 3386 times)

0 Members and 1 Guest are viewing this topic.

azyryanov

  • Newbie
  • *
  • Posts: 2
    • View Profile
RenderWindow size with Windows scaling
« 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.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: RenderWindow size with Windows scaling
« Reply #1 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.

azyryanov

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: RenderWindow size with Windows scaling
« Reply #2 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?
« Last Edit: July 17, 2018, 01:53:07 pm by azyryanov »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: RenderWindow size with Windows scaling
« Reply #3 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.

 

anything