From 4d64e4cd434426234a5c313c151cd79b6afc299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20Vehvil=C3=A4inen?= Date: Sat, 6 Jul 2002 17:50:18 +0000 Subject: *** empty log message *** svn path=/trunk/Framestein/; revision=27 --- Patches/displaydepth.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Patches/displaydepth.h (limited to 'Patches/displaydepth.h') diff --git a/Patches/displaydepth.h b/Patches/displaydepth.h new file mode 100644 index 0000000..3df0471 --- /dev/null +++ b/Patches/displaydepth.h @@ -0,0 +1,19 @@ +#ifndef __DISPLAYDEPTH_H +#define __DISPLAYDEPTH_H + +#include "windows.h" + +int getdisplaydepth(void) +{ + DEVMODE dm; + + dm.dmSize = sizeof(DEVMODE); + dm.dmDriverExtra = 0; + + if(!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)) + return(0); + + return(dm.dmBitsPerPel); +} + +#endif -- cgit v1.2.1