Force fullscreen to a limit of 1280x720 to preserve UI style
This commit is contained in:
parent
b67e4bfc2a
commit
984aae0c58
2 changed files with 5 additions and 4 deletions
|
|
@ -431,6 +431,8 @@ int app_init(App *app) {
|
|||
SDL_WINDOW_SHOWN);
|
||||
app->renderer = SDL_CreateRenderer(app->window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
|
||||
SDL_RenderSetLogicalSize(app->renderer, WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
|
||||
if (!app->window || !app->renderer) {
|
||||
fprintf(stderr, "SDL window or renderer creation failed: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
|
@ -488,10 +490,9 @@ void app_run(App *app) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (SDL_GetRendererOutputSize(app->renderer, &output_width, &output_height) != 0) {
|
||||
(void)SDL_GetRendererOutputSize(app->renderer, &output_width, &output_height);
|
||||
output_width = WINDOW_WIDTH;
|
||||
output_height = WINDOW_HEIGHT;
|
||||
}
|
||||
|
||||
in_blackout = player_is_in_blackout(&app->player);
|
||||
now_ticks = SDL_GetTicks64();
|
||||
|
|
|
|||
BIN
src/app.o
BIN
src/app.o
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue