Pixels per inch

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.nethttp://www.reologica.se —On Sunday 27 February 2005 22.33, Sapsan wrote:

Can I get info about pixels per inch on my screen?

David Olofson wrote:>On Sunday 27 February 2005 22.33, Sapsan wrote:

Can I get info about pixels per inch on my screen?

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?

I want always get constantly sized image independent of resolution,
monitor size etc.

David Olofson wrote:

Can I get info about pixels per inch on my screen?

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?

I want always get constantly sized image independent of resolution,
monitor size etc.

You should really just ask the user. Queries about pixel per inch are
platform-specific, and usually quite unreliable.On Mon, 28 Feb 2005 22:55:56 +0200, Sapsan wrote:

On Sunday 27 February 2005 22.33, Sapsan wrote: