浏览代码

Modify the check condition for the screen window height and width. It can't be less than zero because it's an unsigned int (#1497)

Victor Gallet 4 年之前
父节点
当前提交
57fef97433
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/core.c

+ 2 - 2
src/core.c

@@ -3182,8 +3182,8 @@ static bool InitGraphicsDevice(int width, int height)
     CORE.Window.display.height = mode->height;
     CORE.Window.display.height = mode->height;
 
 
     // Screen size security check
     // Screen size security check
-    if (CORE.Window.screen.width <= 0) CORE.Window.screen.width = CORE.Window.display.width;
-    if (CORE.Window.screen.height <= 0) CORE.Window.screen.height = CORE.Window.display.height;
+    if (CORE.Window.screen.width == 0) CORE.Window.screen.width = CORE.Window.display.width;
+    if (CORE.Window.screen.height == 0) CORE.Window.screen.height = CORE.Window.display.height;
 #endif  // PLATFORM_DESKTOP
 #endif  // PLATFORM_DESKTOP
 
 
 #if defined(PLATFORM_WEB)
 #if defined(PLATFORM_WEB)