From 19a83853b8784b966985e634bd98663ca0ec1b11 Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 16 Jan 2023 12:45:40 -0800 Subject: [PATCH] Default width and height settings to 640x480 While the window is initialized with 640x480, the screen settings defaulted to 320x240, which is a tiny window. The screen settings take priority over the initialized window, so people with no previous settings file will get 320x240. This makes it so they get 640x480 instead. The window is still initialized to 640x480 (constants used for clarity) just in case there's some weirdness if it's initialized to a potentially odd resolution from the user's settings file. --- desktop_version/src/Screen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp index 2f09574d..b26b0c0b 100644 --- a/desktop_version/src/Screen.cpp +++ b/desktop_version/src/Screen.cpp @@ -12,8 +12,8 @@ void ScreenSettings_default(struct ScreenSettings* _this) { - _this->windowWidth = SCREEN_WIDTH_PIXELS; - _this->windowHeight = SCREEN_HEIGHT_PIXELS; + _this->windowWidth = SCREEN_WIDTH_PIXELS * 2; + _this->windowHeight = SCREEN_HEIGHT_PIXELS * 2; _this->fullscreen = false; _this->useVsync = true; // Now that uncapped is the default... _this->scalingMode = SCALING_INTEGER; @@ -46,8 +46,8 @@ void Screen::init(const struct ScreenSettings* settings) // Uncomment this next line when you need to debug -flibit // SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, "software", SDL_HINT_OVERRIDE); SDL_CreateWindowAndRenderer( - 640, - 480, + SCREEN_WIDTH_PIXELS * 2, + SCREEN_HEIGHT_PIXELS * 2, SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI, &m_window, &m_renderer