Small change to allow other platforms to use fullscreen and windowed in WindowMode function

This commit is contained in:
Chandler Cox
2023-08-14 18:25:19 -05:00
parent cfd11a7e77
commit 6e5f693459

View File

@@ -137,20 +137,28 @@ void Screen::SetCursorLock(CursorLockMode mode)
void Screen::SetGameWindowMode(GameWindowMode windowMode)
{
#if (PLATFORM_WINDOWS) && !USE_EDITOR
#if !USE_EDITOR
switch (windowMode)
{
case GameWindowMode::Windowed:
if (GetIsFullscreen())
SetIsFullscreen(false);
#if (PLATFORM_WINDOWS)
Engine::MainWindow->SetBorderless(false, false);
#endif
break;
case GameWindowMode::Fullscreen:
SetIsFullscreen(true);
break;
case GameWindowMode::Borderless:
#if (PLATFORM_WINDOWS)
Engine::MainWindow->SetBorderless(true, false);
#endif
break;
case GameWindowMode::FullscreenBorderless:
#if (PLATFORM_WINDOWS)
Engine::MainWindow->SetBorderless(true, true);
#endif
break;
default: ;
}