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())
|
if (IsWindowsVistaOrGreater())
|
||||||
{
|
{
|
||||||
BOOL enabled = FALSE;
|
|
||||||
|
|
||||||
// DWM Composition is always enabled on Win8+
|
// DWM Composition is always enabled on Win8+
|
||||||
if (IsWindows8OrGreater())
|
BOOL enabled = IsWindows8OrGreater();
|
||||||
enabled = TRUE;
|
|
||||||
|
|
||||||
// HACK: Use DwmFlush when desktop composition is enabled
|
// HACK: Use DwmFlush when desktop composition is enabled
|
||||||
if (enabled ||
|
if (enabled ||
|
||||||
@ -351,11 +348,8 @@ static void swapIntervalWGL(int interval)
|
|||||||
{
|
{
|
||||||
if (IsWindowsVistaOrGreater())
|
if (IsWindowsVistaOrGreater())
|
||||||
{
|
{
|
||||||
BOOL enabled = FALSE;
|
|
||||||
|
|
||||||
// DWM Composition is always enabled on Win8+
|
// DWM Composition is always enabled on Win8+
|
||||||
if (IsWindows8OrGreater())
|
BOOL enabled = IsWindows8OrGreater();
|
||||||
enabled = TRUE;
|
|
||||||
|
|
||||||
// HACK: Disable WGL swap interval when desktop composition is enabled to
|
// HACK: Disable WGL swap interval when desktop composition is enabled to
|
||||||
// avoid interfering with DWM vsync
|
// avoid interfering with DWM vsync
|
||||||
|
Loading…
Reference in New Issue
Block a user