fixed win32 vsync flag not being applied (#5521)
This commit is contained in:
parent
242dfee5ef
commit
1aafd3c4a4
|
|
@ -2149,10 +2149,10 @@ static void UpdateFlags(HWND hwnd, unsigned desiredFlags, int width, int height)
|
||||||
// Flags that just apply immediately without needing any operations
|
// Flags that just apply immediately without needing any operations
|
||||||
CORE.Window.flags |= (desiredFlags & FLAG_MASK_NO_UPDATE);
|
CORE.Window.flags |= (desiredFlags & FLAG_MASK_NO_UPDATE);
|
||||||
|
|
||||||
int vsync = (CORE.Window.flags & FLAG_VSYNC_HINT)? 1 : 0;
|
int vsync = (desiredFlags & FLAG_VSYNC_HINT)? 1 : 0;
|
||||||
if (wglSwapIntervalEXT)
|
if (wglSwapIntervalEXT)
|
||||||
{
|
{
|
||||||
(*wglSwapIntervalEXT)(vsync);
|
wglSwapIntervalEXT(vsync);
|
||||||
if (vsync) CORE.Window.flags |= FLAG_VSYNC_HINT;
|
if (vsync) CORE.Window.flags |= FLAG_VSYNC_HINT;
|
||||||
else CORE.Window.flags &= ~FLAG_VSYNC_HINT;
|
else CORE.Window.flags &= ~FLAG_VSYNC_HINT;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user