Skip to content

Commit

Permalink
Fix how the current "Display Size" is calculated to correctly take th…
Browse files Browse the repository at this point in the history
…e scale into account.
  • Loading branch information
Arignir committed Oct 17, 2024
1 parent 2aa1cf5 commit a54edaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/app/windows/menubar.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ app_win_menubar_video(
if (igMenuItem_Bool(
display_sizes[x - 1],
NULL,
app->ui.display.game.outer.width == GBA_SCREEN_WIDTH * x
&& app->ui.display.game.outer.height == GBA_SCREEN_HEIGHT * x,
app->ui.display.game.outer.width == (uint32_t)round(GBA_SCREEN_WIDTH * x / app->ui.scale)
&& app->ui.display.game.outer.height == (uint32_t)round(GBA_SCREEN_HEIGHT * x / app->ui.scale),
true
)) {
app->settings.video.display_size = x;
Expand Down
4 changes: 2 additions & 2 deletions source/app/windows/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,8 @@ app_win_settings_video(
display_size = -1;
for (i = 1; i < array_length(display_size_names) + 1; ++i) {
if (
app->ui.display.game.outer.width == GBA_SCREEN_WIDTH * i
&& app->ui.display.game.outer.height == GBA_SCREEN_HEIGHT * i
app->ui.display.game.outer.width == (uint32_t)round(GBA_SCREEN_WIDTH * i / app->ui.scale)
&& app->ui.display.game.outer.height == (uint32_t)round(GBA_SCREEN_HEIGHT * i / app->ui.scale)
) {
display_size = i;
break;
Expand Down

0 comments on commit a54edaf

Please sign in to comment.