aboutsummaryrefslogtreecommitdiff
path: root/Patches/displaydepth.h
blob: 3df0471861fc0189924ffc5299f5c1b97453b56b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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