mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 19:38:15 +00:00
REVIEWED: Requested window flags application after window initialization
This commit is contained in:
@@ -1363,8 +1363,9 @@ int InitPlatform(void)
|
|||||||
// additionally auto iconify restores the hardware resolution of the monitor if the window that loses focus is a fullscreen window
|
// additionally auto iconify restores the hardware resolution of the monitor if the window that loses focus is a fullscreen window
|
||||||
glfwWindowHint(GLFW_AUTO_ICONIFY, 0);
|
glfwWindowHint(GLFW_AUTO_ICONIFY, 0);
|
||||||
|
|
||||||
// Keep flags to restore after initialization (for flags not supported on initialization)
|
// Window flags requested before initialization to be applied after initialization
|
||||||
unsigned int originalCoreWindowFlags = CORE.Window.flags;
|
unsigned int requetedWindowFlags = CORE.Window.flags;
|
||||||
|
|
||||||
// Check window creation flags
|
// Check window creation flags
|
||||||
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) CORE.Window.fullscreen = true;
|
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) CORE.Window.fullscreen = true;
|
||||||
|
|
||||||
@@ -1675,6 +1676,9 @@ int InitPlatform(void)
|
|||||||
CORE.Window.position.y = posY;
|
CORE.Window.position.y = posY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply window flags requested previous to initialization
|
||||||
|
SetWindowState(requetedWindowFlags);
|
||||||
|
|
||||||
// Load OpenGL extensions
|
// Load OpenGL extensions
|
||||||
// NOTE: GL procedures address loader is required to load extensions
|
// NOTE: GL procedures address loader is required to load extensions
|
||||||
rlLoadExtensions(glfwGetProcAddress);
|
rlLoadExtensions(glfwGetProcAddress);
|
||||||
@@ -1727,15 +1731,12 @@ int InitPlatform(void)
|
|||||||
|
|
||||||
#if defined(__NetBSD__)
|
#if defined(__NetBSD__)
|
||||||
// Workaround for NetBSD
|
// Workaround for NetBSD
|
||||||
char *glfwPlatform = "X11";
|
char *glfwPlatform = "X11 (NetBSD)";
|
||||||
#else
|
#else
|
||||||
char *glfwPlatform = "";
|
char *glfwPlatform = "";
|
||||||
switch (glfwGetPlatform())
|
switch (glfwGetPlatform())
|
||||||
{
|
{
|
||||||
case GLFW_PLATFORM_WIN32:
|
case GLFW_PLATFORM_WIN32: glfwPlatform = "Win32"; break;
|
||||||
glfwPlatform = "Win32";
|
|
||||||
SetWindowState(originalCoreWindowFlags);
|
|
||||||
break;
|
|
||||||
case GLFW_PLATFORM_COCOA: glfwPlatform = "Cocoa"; break;
|
case GLFW_PLATFORM_COCOA: glfwPlatform = "Cocoa"; break;
|
||||||
case GLFW_PLATFORM_WAYLAND: glfwPlatform = "Wayland"; break;
|
case GLFW_PLATFORM_WAYLAND: glfwPlatform = "Wayland"; break;
|
||||||
case GLFW_PLATFORM_X11: glfwPlatform = "X11"; break;
|
case GLFW_PLATFORM_X11: glfwPlatform = "X11"; break;
|
||||||
|
Reference in New Issue
Block a user