aboutsummaryrefslogtreecommitdiff
path: root/Patches/displaydepth.h
diff options
context:
space:
mode:
authorJuha Vehviläinen <jusu@users.sourceforge.net>2002-07-06 17:50:18 +0000
committerJuha Vehviläinen <jusu@users.sourceforge.net>2002-07-06 17:50:18 +0000
commit4d64e4cd434426234a5c313c151cd79b6afc299e (patch)
tree5c23dd6acc65b869741d3bb9d33912d74bb7407d /Patches/displaydepth.h
*** empty log message ***svn2git-root
svn path=/trunk/Framestein/; revision=27
Diffstat (limited to 'Patches/displaydepth.h')
-rw-r--r--Patches/displaydepth.h19
1 files changed, 19 insertions, 0 deletions
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