Do initialization better

This commit is contained in:
Cliff Smolinsky 2019-03-19 17:09:36 -07:00 committed by GitHub
parent 7eeca12a11
commit 2990afc623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,11 +321,8 @@ static void swapBuffersWGL(_GLFWwindow* window)
{
if (IsWindowsVistaOrGreater())
{
BOOL enabled = FALSE;
// DWM Composition is always enabled on Win8+
if (IsWindows8OrGreater())
enabled = TRUE;
BOOL enabled = IsWindows8OrGreater();
// HACK: Use DwmFlush when desktop composition is enabled
if (enabled ||
@ -351,11 +348,8 @@ static void swapIntervalWGL(int interval)
{
if (IsWindowsVistaOrGreater())
{
BOOL enabled = FALSE;
// DWM Composition is always enabled on Win8+
if (IsWindows8OrGreater())
enabled = TRUE;
BOOL enabled = IsWindows8OrGreater();
// HACK: Disable WGL swap interval when desktop composition is enabled to
// avoid interfering with DWM vsync