mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-23 11:58:37 -05:00
config: override type operator
This commit is contained in:
@@ -92,8 +92,8 @@ void Window::Init()
|
||||
s_window = SDL_CreateWindow(title,
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
SDL_WINDOWPOS_CENTERED,
|
||||
Config::WindowWidth.Value,
|
||||
Config::WindowHeight.Value,
|
||||
Config::WindowWidth,
|
||||
Config::WindowHeight,
|
||||
SDL_WINDOW_RESIZABLE);
|
||||
|
||||
if (auto icon = GetIconSurface())
|
||||
@@ -103,7 +103,7 @@ void Window::Init()
|
||||
}
|
||||
|
||||
SetWindowDimensions();
|
||||
SetFullscreen(Config::Fullscreen.Value);
|
||||
SetFullscreen(Config::Fullscreen);
|
||||
|
||||
SDL_SysWMinfo info;
|
||||
SDL_VERSION(&info.version);
|
||||
|
||||
@@ -29,8 +29,8 @@ public:
|
||||
|
||||
static bool IsDisplayResolution(int w, int h, bool isExact = true)
|
||||
{
|
||||
auto width = w <= 0 ? Config::WindowWidth.Value : w;
|
||||
auto height = h <= 0 ? Config::WindowHeight.Value : h;
|
||||
auto width = w <= 0 ? Config::WindowWidth : w;
|
||||
auto height = h <= 0 ? Config::WindowHeight : h;
|
||||
|
||||
SDL_Rect displayRect;
|
||||
if (SDL_GetDisplayBounds(SDL_GetWindowDisplayIndex(s_window), &displayRect) == ERROR_SUCCESS)
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
|
||||
static void SetWindowDimensions(int w = -1, int h = -1)
|
||||
{
|
||||
auto width = w <= 0 ? Config::WindowWidth.Value : w;
|
||||
auto height = h <= 0 ? Config::WindowHeight.Value : h;
|
||||
auto width = w <= 0 ? Config::WindowWidth : w;
|
||||
auto height = h <= 0 ? Config::WindowHeight : h;
|
||||
auto isPendingMaximise = false;
|
||||
|
||||
if (IsDisplayResolution(width, height))
|
||||
|
||||
Reference in New Issue
Block a user