Commit 3779153d by John Bauman Committed by Nicolas Capens

Fix on XP

parent cffcb1b3
......@@ -28,6 +28,22 @@
namespace egl
{
namespace
{
const int versionWindowsVista = MAKEWORD(0x00, 0x06);
const int versionWindows7 = MAKEWORD(0x01, 0x06);
// Return the version of the operating system in a format suitable for ordering
// comparison.
int getComparableOSVersion()
{
DWORD version = GetVersion();
int majorVersion = LOBYTE(LOWORD(version));
int minorVersion = HIBYTE(LOWORD(version));
return MAKEWORD(minorVersion, majorVersion);
}
}
Surface::Surface(Display *display, const Config *config, HWND window)
: mDisplay(display), mConfig(config), mWindow(window)
{
......@@ -85,7 +101,7 @@ bool Surface::initialize()
// Modify present parameters for this window, if we are composited,
// to minimize the amount of queuing done by DWM between our calls to
// present and the actual screen.
if(mWindow && (LOWORD(GetVersion()) >= 0x60))
if (mWindow && (getComparableOSVersion() >= versionWindowsVista))
{
BOOL isComposited;
HRESULT result = DwmIsCompositionEnabled(&isComposited);
......
......@@ -88,6 +88,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
......@@ -126,6 +127,7 @@ copy "$(OutDir)libGLESv2.lib" "$(ProjectDir)..\..\lib\$(Configuration)\"
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>mkdir "$(ProjectDir)..\..\lib\$(Configuration)\"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment