mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-03 04:39:18 -05:00
fixed win32 vsync flag not being applied (#5521)
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user