瀏覽代碼

Merge pull request #4837 from Andersama/support_all_window_flags_at_initialization

[rcore] Support window flags with initialization issues
pull/5111/head
Ray 2 月之前
committed by GitHub
父節點
當前提交
195b968b86
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: B5690EEEBB952194
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      src/platforms/rcore_desktop_glfw.c

+ 6
- 1
src/platforms/rcore_desktop_glfw.c 查看文件

@ -1363,6 +1363,8 @@ int InitPlatform(void)
// 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);
// Keep flags to restore after initialization (for flags not supported on initialization)
unsigned int originalCoreWindowFlags = CORE.Window.flags;
// Check window creation flags
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) CORE.Window.fullscreen = true;
@ -1730,7 +1732,10 @@ int InitPlatform(void)
char *glfwPlatform = "";
switch (glfwGetPlatform())
{
case GLFW_PLATFORM_WIN32: glfwPlatform = "Win32"; break;
case GLFW_PLATFORM_WIN32:
glfwPlatform = "Win32";
SetWindowState(originalCoreWindowFlags);
break;
case GLFW_PLATFORM_COCOA: glfwPlatform = "Cocoa"; break;
case GLFW_PLATFORM_WAYLAND: glfwPlatform = "Wayland"; break;
case GLFW_PLATFORM_X11: glfwPlatform = "X11"; break;

Loading…
取消
儲存