int math done with floats causes warnings. (#3218)
This commit is contained in:
parent
b60c691816
commit
04678bc585
1 changed files with 2 additions and 2 deletions
|
@ -1693,8 +1693,8 @@ void SetWindowMonitor(int monitor)
|
||||||
if ((screenWidth >= monitorWorkareaWidth) || (screenHeight >= monitorWorkareaHeight)) glfwSetWindowPos(CORE.Window.handle, monitorWorkareaX, monitorWorkareaY);
|
if ((screenWidth >= monitorWorkareaWidth) || (screenHeight >= monitorWorkareaHeight)) glfwSetWindowPos(CORE.Window.handle, monitorWorkareaX, monitorWorkareaY);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int x = monitorWorkareaX + (monitorWorkareaWidth*0.5f) - (screenWidth*0.5f);
|
const int x = monitorWorkareaX + (monitorWorkareaWidth/2) - (screenWidth/2);
|
||||||
const int y = monitorWorkareaY + (monitorWorkareaHeight*0.5f) - (screenHeight*0.5f);
|
const int y = monitorWorkareaY + (monitorWorkareaHeight/2) - (screenHeight/2);
|
||||||
glfwSetWindowPos(CORE.Window.handle, x, y);
|
glfwSetWindowPos(CORE.Window.handle, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue