Any Way to Detect an LCD Monitor in Code?
Miscellaneous Forums/General Discussion/Any Way to Detect an LCD Monitor in Code?
I was just about to post this on the IndieGamer forums yesterday when I noticed someone already had, just a day before me. Anyway, there's no concrete solutions there yet, so I thought I'd ask here and see if anyone has any ideas.
I'd like my game to function differently with an LCD screen, so any method of detecting it would be very handy.
Why not simply have it as an option? Perhaps ask the user first time the game is run.
I doubt there's any way of detecting this. The GFX card has output only, and that's it... unless I'm wrong. :)
Why not simply have it as an option? Perhaps ask the user first time the game is run.
Because when we're talking about users who don't know how many hard drives they have, we could well be talking about users who don't know whether they have an LCD monitor or not. They buy a PC from Dell, HP, Compaq, etc and really don't know much more than that, in many cases.
I doubt there's any way of detecting this. The GFX card has output only, and that's it... unless I'm wrong. :)
Well yeah, the monitor doesn't have output, but they often have drivers ( though I don't intend to rely on this as many people won't have installed them ) so I'm just thinking that they might leave some trace of their existance around somewhere.
This should point you in the right direction.
Can I ask what you intend to do if they have an LCD? The answer may shed some light on a possible solution.
Tim.
There not a way to check the means of connection to the vid card? Most TFTs I know use a DVI cable, using a standard VGA is just a waste with flat-screens.
@ Indie
Only reason I myself could think of is possibly setting said game at the monitor's native rez, though as how to obtain that native rez is another question...
Oh come on Gabriel, a simple icon (or even an animation) and they would realise what a flatscreen was! Even casual gamers aren't that stupid! ;-)
This should point you in the right direction.
Great, I'll have a play with that and see where I get. Thanks!
Can I ask what you intend to do if they have an LCD? The answer may shed some light on a possible solution.
Let them choose whether the display is stretched to fit the screen or run at the default resolution with a border when they're in fullscreen mode. I just haven't decided which I will default to yet.
Even casual gamers aren't that stupid! ;-)
If you've got a spare evening one day, I'll link you to the MSN Computer support chatroom I hang out in. It'll open your eyes to a whole world of stupid you never thought existed. And neither did I till I started hanging out there ;)
Let them choose whether the display is stretched to fit the screen or run at the default resolution with a border when they're in fullscreen mode. I just haven't decided which I will default to yet.
Ah Okay, how do you do a fullscreen like that anyway?
Manually, I guess. If they choose to have the border, I'll be using a separate render function which offsets all the drawing, mouse input, etc accordingly.
Ah okay, so grab the native resolution and create an offset viewport. Makes sense.. Sounds like fun trying to make this work. Is this native BMAX or TrueVision?
I'm using HGE at the moment, though I may consider a BMax version when I'm done with the game, just to see which would work best.
I'm not sure all monitors can be detected. When installing Linux on my box I had trouble with that, and found out eventually that there was some kind of standard for graphics cards and monitors to communicate (even through VGA), but on my machine this was simply not working correctly. I have a big old 24" CRT monster of a screen, so maybe all modern LCD screens do support it.
Ragnar
Let them choose whether the display is stretched to fit the screen or run at the default resolution with a border when they're in fullscreen mode. I just haven't decided which I will default to yet.
So if i understood you right you want to stay with the already set resolution and stretch the content there or offer it with borders?
When you also want to change the resolution then i think you're kind of lost as depending on the monitor settings the content will already be shown with borders or stretched and i doubt that this information is known by the os. And even if it is, you can't change a thing about this. For sure there's no information if the lcd is connected via the analog port.
Nothing to do with this but this reminds me of my osx-issue where i do use a miniMac with a pc-lcd. If connected via a digital port osx is able to offer the full spectrum of save resolutions. If you connect via the analog port then osx doesn't recognize it and so offers all to the os available resolutions... ;O)
Regards,
taumel
If you've got a spare evening one day, I'll link you to the MSN Computer support chatroom I hang out in. It'll open your eyes to a whole world of stupid you never thought existed. And neither did I till I started hanging out there ;)
Please do so, I am rather interested in experinecing that sort of stupidity!
Well if the worst comes to the worst, I can default to streching and offer the centering option to all monitor types. Even on a CRT monitor, some people may appreciate the option not to change resolution. That ugly flicker as the screen mode changes can be annoying.
Display a white screen, and ask them if they see a black pixel.
I doubt there's any way of detecting this. The GFX card has output only, and that's it... unless I'm wrong
There is some very basic two-way communication going on as well -- pretty much all monitors nowadays are plug & play, and can supply the computer with a list of supported resolutions. XP will also recognize the make & model of most screens.
So... You may be able to just retrieve the name of the installed monitor from the registry somewhere, and go from there?
(Even if not explicitely stated, you may be able to figure some things out based on supported resolutions & refreshrates as well)
Display a white screen, and ask them if they see a black pixel.
lol and if they see > 4 tell them to ask for a refund. Also if they see the face or jesus or mary, sell the TFT on ebay for no less than5 figures :-)