Add debug code to fix resolution to 1024x576

This commit is contained in:
Nikita Lisitsa 2024-08-02 16:55:47 +03:00
parent 9843a0cf06
commit c1c9e304da

View file

@ -50,7 +50,19 @@ namespace psemek::sdl2
SDL_DisplayMode display_mode;
SDL_GetCurrentDisplayMode(0, &display_mode);
window_ = SDL_CreateWindow(options.name.data(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, display_mode.w, display_mode.h, flags);
int x = SDL_WINDOWPOS_UNDEFINED;
int y = SDL_WINDOWPOS_UNDEFINED;
if (false)
{
display_mode.w = 1024;
display_mode.h = 576;
flags ^= SDL_WINDOW_RESIZABLE;
x = 0;
y = 0;
}
window_ = SDL_CreateWindow(options.name.data(), x, y, display_mode.w, display_mode.h, flags);
if (!window_)
sdl2::fail("Failed to create window: ");