Update MaximizeWindow() and RestoreWindow() to set/unset the FLAG_WINDOW_MAXIMIZED
This commit is contained in:
parent
cf5854f919
commit
d277c9d6de
|
|
@ -328,6 +328,8 @@ void MaximizeWindow(void)
|
||||||
const int tabHeight = EM_ASM_INT( { return window.innerHeight; }, 0);
|
const int tabHeight = EM_ASM_INT( { return window.innerHeight; }, 0);
|
||||||
|
|
||||||
if (tabWidth && tabHeight) glfwSetWindowSize(platform.handle, tabWidth, tabHeight);
|
if (tabWidth && tabHeight) glfwSetWindowSize(platform.handle, tabWidth, tabHeight);
|
||||||
|
|
||||||
|
CORE.Window.flags |= FLAG_WINDOW_MAXIMIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -343,6 +345,8 @@ void RestoreWindow(void)
|
||||||
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE)
|
if (glfwGetWindowAttrib(platform.handle, GLFW_RESIZABLE) == GLFW_TRUE)
|
||||||
{
|
{
|
||||||
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);
|
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);
|
||||||
|
|
||||||
|
CORE.Window.flags &= ~FLAG_WINDOW_MAXIMIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user