aboutsummaryrefslogtreecommitdiff
path: root/Patches/displaydepth.h
diff options
context:
space:
mode:
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