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)

This commit is contained in:
Victor Gallet 2020-12-31 13:29:35 +01:00 committed by GitHub
parent 03278a74bf
commit 57fef97433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -3182,8 +3182,8 @@ static bool InitGraphicsDevice(int width, int height)
CORE.Window.display.height = mode->height;
// 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
#if defined(PLATFORM_WEB)