Commit c4360903 by John Bauman Committed by Nicolas Capens

Merge in ANGLE r701 and r688

This wasn't delay-loading dwmapi.dll, causing it to fail on XP. Review URL: https://chromereviews.googleplex.com/3895016
parent 545afd55
......@@ -23,6 +23,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)
{
......@@ -80,7 +96,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);
......
......@@ -146,7 +146,7 @@
AdditionalDependencies="d3d9.lib dxguid.lib dwmapi.lib"
LinkIncremental="1"
ModuleDefinitionFile="libEGL.def"
DelayLoadDLLs="dwmapi.lib"
DelayLoadDLLs="dwmapi.dll"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
......
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