From 2525017990c6098295a18f0320370ab8d91c2662 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 28 Jan 2023 23:37:24 -0800 Subject: [PATCH] Set minimum window size (to 320 x 240) This sets the minimum window size (to 320 x 240), so that the window cannot be resized to lower than that. This is because there's no utility in having a game window smaller than that, and it provides a bonus convenience of being able to resize the game to exactly 320x240 without needing to be exactly precise about it. This idea was suggested by Dav999. --- desktop_version/src/Screen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Screen.cpp b/desktop_version/src/Screen.cpp index bb428ab4..d4fd3ce6 100644 --- a/desktop_version/src/Screen.cpp +++ b/desktop_version/src/Screen.cpp @@ -69,6 +69,8 @@ void Screen::init(const struct ScreenSettings* settings) SDL_SetWindowTitle(m_window, "VVVVVV"); #endif + SDL_SetWindowMinimumSize(m_window, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS); + LoadIcon(); badSignalEffect = settings->badSignal;