mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
Fix MaximizeWindow() for PLATFORM_WEB (#4404)
This commit is contained in:
@@ -319,7 +319,7 @@ void ToggleBorderlessWindowed(void)
|
|||||||
// Set window state: maximized, if resizable
|
// Set window state: maximized, if resizable
|
||||||
void MaximizeWindow(void)
|
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.unmaximizedWidth = CORE.Window.screen.width;
|
||||||
platform.unmaximizedHeight = CORE.Window.screen.height;
|
platform.unmaximizedHeight = CORE.Window.screen.height;
|
||||||
@@ -342,7 +342,7 @@ void MinimizeWindow(void)
|
|||||||
// Set window state: not minimized/maximized
|
// Set window state: not minimized/maximized
|
||||||
void RestoreWindow(void)
|
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);
|
if (platform.unmaximizedWidth && platform.unmaximizedHeight) glfwSetWindowSize(platform.handle, platform.unmaximizedWidth, platform.unmaximizedHeight);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user