fix issue #2728
This commit is contained in:
parent
45da03df23
commit
76621c9e53
|
|
@ -4109,8 +4109,10 @@ static bool InitGraphicsDevice(int width, int height)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
// Center window on screen
|
// Center window on screen
|
||||||
int windowPosX = CORE.Window.display.width/2 - CORE.Window.screen.width/2;
|
int windowPosX, windowPosY;
|
||||||
int windowPosY = CORE.Window.display.height/2 - CORE.Window.screen.height/2;
|
glfwGetMonitorPos(monitor, &windowPosX, &windowPosY);
|
||||||
|
windowPosX += CORE.Window.display.width/2 - CORE.Window.screen.width/2;
|
||||||
|
windowPosY += CORE.Window.display.height/2 - CORE.Window.screen.height/2;
|
||||||
|
|
||||||
if (windowPosX < 0) windowPosX = 0;
|
if (windowPosX < 0) windowPosX = 0;
|
||||||
if (windowPosY < 0) windowPosY = 0;
|
if (windowPosY < 0) windowPosY = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user