瀏覽代碼

Fix MaximizeWindow() for PLATFORM_WEB (#4404)

pull/4408/head
Asdqwe 2 月之前
committed by GitHub
父節點
當前提交
cb21fe88d3
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      src/platforms/rcore_web.c

+ 2
- 2
src/platforms/rcore_web.c 查看文件

@ -319,7 +319,7 @@ void ToggleBorderlessWindowed(void)
// Set window state: maximized, if resizable
void MaximizeWindow(void)
{
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE)
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE && !(CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
{
platform.unmaximizedWidth = CORE.Window.screen.width;
platform.unmaximizedHeight = CORE.Window.screen.height;
@ -342,7 +342,7 @@ void MinimizeWindow(void)
// Set window state: not minimized/maximized
void RestoreWindow(void)
{
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE)
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE && (CORE.Window.flags & FLAG_WINDOW_MAXIMIZED))
{
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);

Loading…
取消
儲存