[SDL] pixels per inch

David Olofson david at olofson.net
Sun Feb 27 15:33:37 PST 2005


On Sunday 27 February 2005 22.33, Sapsan wrote:
> Can I get info about pixels per inch on my screen?

No SDL API for that AFAIK - and even if there was, it wouldn't be 
reliable.

Applications that really care usually offer the user some way of 
overriding whatever the graphics subsystem says, as that option is 
often abused as a way of scaling fonts system wide. Of course, 
there's also a rather big risk of the monitor(s) being detected 
incorrectly, and the PPI values being off for that reason.

What do you need it for? What kind of accuracy and reliability do you 
need? If it's really important, maybe it's easier, safer and/or 
better to just ask the user?


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---




More information about the SDL mailing list