View Full Version : Code checking if a monitor is LCD
Tertsi
05-04-2006, 01:31 AM
I'd like to have C++ code in MGEngine which checks if a monitor is an LCD one and if so and the full screen resolution isn't its native resolution, default to windowed mode instead of defaulting to full screen mode.
So I wonder if that's possible and if so, how?
PeterM
05-04-2006, 01:50 AM
Is the scaling a big issue? My monitor is 1280x1024 and I'm not usually bothered by the scaling it does, and it's a cheapo monitor so better ones may scale better.
Maybe things look worse of the screen is 1024x768 or smaller.
Tertsi
05-04-2006, 07:49 AM
I don't really know but I was inspired by someone here who said he doesn't like the "ugly scaling off a native LCD resolution" or something like that.
Jamie W
05-04-2006, 09:13 AM
Isn't scaling done by the video card, and not the monitor (be it LCD or CRT)?
PeterM
05-04-2006, 09:16 AM
Not as far as I know - I sometimes have to twiddle with buttons on my monitor to get it to scale properly, I presume the screen would stay in the same physical res if the card was scaling instead.
Edit: I think you mean a different kind of scaling.
The scaling is done by the monitor. And the quality is better with newer models.
I also think that there is no reliable way to determine the monitor type. Getting the screenmodes and looking at the refreshrates might give you a hint, but its nothing concrete and the OS might aswell just report 0hz for all modes.
Robert Cummings
05-04-2006, 02:07 PM
If you're that desperate (and you are being totally silly about this), open a modeless window and render fullscreen to that. A few AAA games do this also.
It is only slightly slower.
PeterM
05-04-2006, 02:22 PM
I would be very pleased if games running in 640x480 used a backbuffer of that size and blitted up to 1280x1024 using bilinear filtering.
I never thought of doing that before.
gmcbay
05-04-2006, 02:32 PM
There is a Win32_DesktopMonitor class as part of the Windows Management Instrumentation API, but it often reports bogus results because people seem to rarely have the proper plug & play driver installed for any given monitor. Given how unreliable all the potential detection methods are, it is the sort of thing best left as a user option.
The scaling on some new monitors IS better, but even some new ones still do really crappy scaling if the aspect ratio of the native display is different than the requested resolution as often happens with widescreen LCDs trying to display a 4x3 (eg. 800x600) image. So I think putting in hooks for this to be a user option is a great idea.
Just look at the desktop resolution. It's unlikely that someone would be running that in an off mode and an LCD. And if they are, they deserve a screwed up image. ;)
Speckled Jim
05-05-2006, 04:14 AM
I wouldn't be at all surprised to find people doing just that.
Sharpfish
05-05-2006, 05:05 AM
I wouldn't be at all surprised to find people doing just that.
I know a few people with LCDs who run @ 1024x768 when native is 1280x1024. I say "you do realise if you stick that into it's proper res you wont get all that crap on screen? things will look sharper and you will have more real estate"
no-one listens. ;)
My laptop is widescreen 1280x800 and I run games non scaled (with borders) if they don't provide that res choice, which is preferable to monitor scaling. Bear in mind that some people turn it off in their device settings (ATI has a clearly marked scaling on/off for my laptop in their catalyst drivers). So it's not always as clear cut anyway.
Sybixsus
05-05-2006, 11:10 AM
I recall playing one of Retro 64's games and that it had an option to either stretch or center the game window. It specifically mentions that it's an LCD setting, but I can't say whether it has any effect on CRT monitors as I no longer have done. I think it was Water Bugs.
So maybe Mike has some idea of how to do this?
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.