From 04678bc585b51bf218310387b048e846ca4a7718 Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Wed, 2 Aug 2023 10:12:38 -0700 Subject: [PATCH] int math done with floats causes warnings. (#3218) --- src/rcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index 282fec17..fc87e735 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1693,8 +1693,8 @@ void SetWindowMonitor(int monitor) if ((screenWidth >= monitorWorkareaWidth) || (screenHeight >= monitorWorkareaHeight)) glfwSetWindowPos(CORE.Window.handle, monitorWorkareaX, monitorWorkareaY); else { - const int x = monitorWorkareaX + (monitorWorkareaWidth*0.5f) - (screenWidth*0.5f); - const int y = monitorWorkareaY + (monitorWorkareaHeight*0.5f) - (screenHeight*0.5f); + const int x = monitorWorkareaX + (monitorWorkareaWidth/2) - (screenWidth/2); + const int y = monitorWorkareaY + (monitorWorkareaHeight/2) - (screenHeight/2); glfwSetWindowPos(CORE.Window.handle, x, y); } }