explicit focus request in ToggleFullscreen()
fix issue mentioned by @paulmelis ?
This commit is contained in:
parent
b004531efb
commit
1b800a14eb
|
|
@ -172,7 +172,7 @@ void ToggleFullscreen(void)
|
||||||
|
|
||||||
if (monitor == NULL)
|
if (monitor == NULL)
|
||||||
{
|
{
|
||||||
TRACELOG(LOG_WARNING, "GLFW: Failed to get monitor");
|
TRACELOG(LOG_WARNING, "GLFW: ToggleFullscreen() failed to get monitor");
|
||||||
|
|
||||||
CORE.Window.fullscreen = false;
|
CORE.Window.fullscreen = false;
|
||||||
CORE.Window.flags &= ~FLAG_FULLSCREEN_MODE;
|
CORE.Window.flags &= ~FLAG_FULLSCREEN_MODE;
|
||||||
|
|
@ -214,6 +214,9 @@ void ToggleFullscreen(void)
|
||||||
WindowSizeCallback(platform.handle, CORE.Window.previousScreen.width, CORE.Window.previousScreen.height);
|
WindowSizeCallback(platform.handle, CORE.Window.previousScreen.width, CORE.Window.previousScreen.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refocus window
|
||||||
|
glfwFocusWindow(platform.handle);
|
||||||
|
|
||||||
// Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS)
|
// Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS)
|
||||||
// NOTE: V-Sync can be enabled by graphic driver configuration
|
// NOTE: V-Sync can be enabled by graphic driver configuration
|
||||||
if (CORE.Window.flags & FLAG_VSYNC_HINT) glfwSwapInterval(1);
|
if (CORE.Window.flags & FLAG_VSYNC_HINT) glfwSwapInterval(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user