mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Do initialization better
This commit is contained in:
parent
7eeca12a11
commit
2990afc623
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user