test desk top 32 or 16 bit

Started by
0 comments, last by S1CA 18 years, 1 month ago
how do i test to see what color depth the desk top is in. i have programed a windowed game in 16 bit color and i want it to test to see if the desktop is in that mode befor it starts. thanks my game so far and code if any one know how to covert to 32 bit please help i seem to keep going round and round and not getting any where. http://lindon-games.mysite.wanadoo-members.co.uk/Balloon.zip ps only level one works so far.
Advertisement
Assuming Direct3D 9 (you don't say which API you're using...):

After you call Direct3DCreate9(), but before you call IDirect3D9::CreateDevice(), simply call IDirect3D9::GetAdapterDisplayMode(). This will get you the dimensions and pixel format that the display is currently.


You can also query this using GDI calls alone. Take a look at EnumDisplaySettings() with the ENUM_CURRENT_SETTINGS flag.

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement