0
|
1 #pragma once
|
|
2 #include "OSAPI.h"
|
|
3
|
2152
|
4 class OSInfo
|
0
|
5 {
|
2152
|
6 public:
|
|
7 inline static bool CanUseDirectDraw4()
|
|
8 {
|
|
9 if (Ready())
|
|
10 return info.dwPlatformId != VER_PLATFORM_WIN32_NT || info.dwMajorVersion >= 4;
|
|
11 return false;
|
|
12 }
|
0
|
13
|
2152
|
14 inline static bool CanUseDirectDraw2()
|
|
15 {
|
|
16 return true;
|
|
17 }
|
0
|
18
|
|
19
|
2152
|
20 private:
|
|
21 static bool initialized;
|
|
22 static OSVERSIONINFOA info;
|
0
|
23
|
2152
|
24 static bool Ready()
|
|
25 {
|
|
26 if (!initialized)
|
|
27 {
|
|
28 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
|
|
29 if (GetVersionExA(&info))
|
|
30 initialized = true;
|
|
31 }
|
|
32 return initialized;
|
|
33 }
|
|
34 }; |