Skip to content

Commit

Permalink
gui2/preferences_dialog: Fix breakage of display ratios listing
Browse files Browse the repository at this point in the history
Regression from 0c2134a / 1.15.10.
  • Loading branch information
irydacea committed Mar 20, 2021
1 parent 2fac56c commit 605fe2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -57,6 +57,7 @@
* Set the correct default text color for in-game UI elements instead of #ffffff white for consistency with other UI elements.
* Increased font sizes in Help and some legacy UI elements.
* Minor clean-up of game menus display.
* Fixed missing display resolution ratios in Preferences -> Display (regression introduced in 1.15.10).
### WML Engine
* Standard Location Filters now support gives_income=yes|no to make it simpler to match villages regardless of owner
* Fixed ThemeWML `[label] font_rgb=` generating text elements with broken UTF-8 sequences.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/preferences_dialog.cpp
Expand Up @@ -135,7 +135,7 @@ void preferences_dialog::set_resolution_list(menu_button& res_list)
config option;
option["label"] = formatter() << res.x << font::unicode_multiplication_sign << res.y;

const int div = std::gcd(12, 4);
const int div = std::gcd(res.x, res.y);
const int x_ratio = res.x / div;
const int y_ratio = res.y / div;

Expand Down

0 comments on commit 605fe2e

Please sign in to comment.