annotate OSInfo.h @ 2575:a76d408c5132 tip

DrawTranslucent -> DrawTextureGrayShade Removed old texture drawing stuff
author a.parshin
date Wed, 09 Mar 2016 01:39:52 +0200
parents d44b7775fc06
children
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "OSAPI.h"
Ritor1
parents:
diff changeset
3
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
4 class OSInfo
0
Ritor1
parents:
diff changeset
5 {
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
6 public:
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
7 inline static bool CanUseDirectDraw4()
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
8 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
9 if (Ready())
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
10 return info.dwPlatformId != VER_PLATFORM_WIN32_NT || info.dwMajorVersion >= 4;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
11 return false;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
12 }
0
Ritor1
parents:
diff changeset
13
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
14 inline static bool CanUseDirectDraw2()
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
15 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
16 return true;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
17 }
0
Ritor1
parents:
diff changeset
18
Ritor1
parents:
diff changeset
19
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
20 private:
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
21 static bool initialized;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
22 static OSVERSIONINFOA info;
0
Ritor1
parents:
diff changeset
23
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
24 static bool Ready()
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
25 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
26 if (!initialized)
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
27 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
28 info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
29 if (GetVersionExA(&info))
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
30 initialized = true;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
31 }
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
32 return initialized;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
33 }
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 1458
diff changeset
34 };