mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-07 21:56:44 +01:00
fix aspect ratio letterboxing on automatic resolution
This commit is contained in:
parent
fc9317d215
commit
ce4b474b5a
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,7 @@ SYMBOL_EXPORT void SetupViewport(struct Game *game, struct Viewport config) {
|
|||
game->viewport.width = game->viewport.aspect * game->viewport.height;
|
||||
if (game->viewport.width > al_get_display_width(game->display)) {
|
||||
game->viewport.width = al_get_display_width(game->display);
|
||||
game->viewport.height = game->viewport.aspect / game->viewport.width;
|
||||
game->viewport.height = game->viewport.width / (float)game->viewport.aspect;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue