SFML community forums

Help => General => Topic started by: verbrannt on January 26, 2015, 05:02:26 pm

Title: Window size on OS X & Retina display
Post by: verbrannt on January 26, 2015, 05:02:26 pm
Hi.

Tested on 2.2 (from sources) & github master.

Code below makes window with size 400x300:

sf::Window window(sf::VideoMode(800, 600), "My window");

Of course in real (hardware) pixels it have normal size (800x600 real pixels), but by default OS X scales resolution. Same problem with sprites & other.

So can the SFML detect that need to scale all sizes automatically when i run app on retina display and non-retina display?
Title: Re: Window size on OS X & Retina display
Post by: Hiura on January 26, 2015, 05:31:54 pm
Set `High Resolution Capable` in your application plist file to `No` if you don't want this scaling.
Title: Re: Window size on OS X & Retina display
Post by: verbrannt on January 26, 2015, 05:58:25 pm
It works, thank you!
But now window title looks horrible.

May be exists some method, that returns OS scale modifier? Eg for OS X & Retina modifier = 2, on non-retina is 1, and i just multiply all sizes in my app by this modifier (or if it = 2, load HD images)?
Title: Re: Window size on OS X & Retina display
Post by: Hiura on January 26, 2015, 06:12:16 pm
not yet. http://en.sfml-dev.org/forums/index.php?topic=17092.0