1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-03 03:23:33 +02:00

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.
This commit is contained in:
Misa 2023-01-16 12:45:40 -08:00
parent d2b6fb2d06
commit 19a83853b8

View File

@ -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