Fix fullscreen borderless window on macOS
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
void LinuxGame::InitMainWindowSettings(CreateWindowSettings& settings)
|
||||
{
|
||||
// TODO: restore window size and fullscreen mode from the cached local settings saved after previous session
|
||||
|
||||
const auto platformSettings = LinuxPlatformSettings::Get();
|
||||
auto windowMode = platformSettings->WindowMode;
|
||||
|
||||
@@ -50,7 +48,6 @@ void LinuxGame::InitMainWindowSettings(CreateWindowSettings& settings)
|
||||
settings.HasBorder = windowMode == GameWindowMode::Windowed || windowMode == GameWindowMode::Fullscreen;
|
||||
settings.AllowMaximize = true;
|
||||
settings.AllowMinimize = platformSettings->ResizableWindow;
|
||||
|
||||
}
|
||||
|
||||
bool LinuxGame::Init()
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
void MacGame::InitMainWindowSettings(CreateWindowSettings& settings)
|
||||
{
|
||||
// TODO: restore window size and fullscreen mode from the cached local settings saved after previous session
|
||||
|
||||
const auto platformSettings = MacPlatformSettings::Get();
|
||||
auto windowMode = platformSettings->WindowMode;
|
||||
|
||||
@@ -41,7 +39,6 @@ void MacGame::InitMainWindowSettings(CreateWindowSettings& settings)
|
||||
settings.HasBorder = windowMode == GameWindowMode::Windowed || windowMode == GameWindowMode::Fullscreen;
|
||||
settings.AllowMaximize = true;
|
||||
settings.AllowMinimize = platformSettings->ResizableWindow;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
void WindowsGame::InitMainWindowSettings(CreateWindowSettings& settings)
|
||||
{
|
||||
// TODO: restore window size and fullscreen mode from the cached local settings saved after previous session
|
||||
|
||||
const auto platformSettings = WindowsPlatformSettings::Get();
|
||||
auto windowMode = platformSettings->WindowMode;
|
||||
|
||||
|
||||
@@ -715,6 +715,11 @@ MacWindow::MacWindow(const CreateWindowSettings& settings)
|
||||
styleMask |= NSWindowStyleMaskTitled;
|
||||
styleMask &= ~NSWindowStyleMaskFullSizeContentView;
|
||||
}
|
||||
else
|
||||
{
|
||||
styleMask |= NSWindowStyleMaskBorderless;
|
||||
styleMask &= ~NSWindowStyleMaskTitled;
|
||||
}
|
||||
|
||||
const float screenScale = MacPlatform::ScreenScale;
|
||||
frame.origin.x /= screenScale;
|
||||
|
||||
Reference in New Issue
Block a user