mirror of https://github.com/raysan5/raylib
Update rcore_desktop.c
This commit is contained in:
parent
e1379afb01
commit
5767c4cd05
|
@ -1443,15 +1443,12 @@ int InitPlatform(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No-fullscreen window creation
|
// No-fullscreen window creation
|
||||||
bool wantWindowedFullscreen = (CORE.Window.screen.height == 0) && (CORE.Window.screen.width == 0);
|
bool requestWindowedFullscreen = (CORE.Window.screen.height == 0) && (CORE.Window.screen.width == 0);
|
||||||
|
|
||||||
// If we are windowed fullscreen, ensures that window does not minimize when focus is lost.
|
// If we are windowed fullscreen, ensures that window does not minimize when focus is lost.
|
||||||
// This hinting code will not work if the user already specified the correct monitor dimensions;
|
// This hinting code will not work if the user already specified the correct monitor dimensions;
|
||||||
// at this point we don't know the monitor's dimensions. (Though, how did the user then?)
|
// at this point we don't know the monitor's dimensions. (Though, how did the user then?)
|
||||||
if (wantWindowedFullscreen)
|
if (requestWindowedFullscreen) glfwWindowHint(GLFW_AUTO_ICONIFY, 0);
|
||||||
{
|
|
||||||
glfwWindowHint(GLFW_AUTO_ICONIFY, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Default to at least one pixel in size, as creation with a zero dimension is not allowed.
|
// Default to at least one pixel in size, as creation with a zero dimension is not allowed.
|
||||||
int creationWidth = CORE.Window.screen.width != 0 ? CORE.Window.screen.width : 1;
|
int creationWidth = CORE.Window.screen.width != 0 ? CORE.Window.screen.width : 1;
|
||||||
|
@ -1471,11 +1468,7 @@ int InitPlatform(void)
|
||||||
monitor = monitors[monitorIndex];
|
monitor = monitors[monitorIndex];
|
||||||
SetDimensionsFromMonitor(monitor);
|
SetDimensionsFromMonitor(monitor);
|
||||||
|
|
||||||
TRACELOG(LOG_INFO, "wantWindowed: %d, size: %dx%d", wantWindowedFullscreen, CORE.Window.screen.width, CORE.Window.screen.height);
|
if (requestWindowedFullscreen) glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height);
|
||||||
if (wantWindowedFullscreen)
|
|
||||||
{
|
|
||||||
glfwSetWindowSize(platform.handle, CORE.Window.screen.width, CORE.Window.screen.height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue