Skip to content

Commit

Permalink
Fix aspect ratio in resolution setting dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
aquileia committed Apr 16, 2014
1 parent 066ae06 commit 9e34f5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/preferences_display.cpp
Expand Up @@ -293,8 +293,9 @@ bool show_video_mode_dialog(display& disp)
std::ostringstream option;
option << res.first << utils::unicode_multiplication_sign << res.second;
const int div = boost::math::gcd(res.first, res.second);
if (div >= 10)
option << " (" << res.first/div << ':' << res.second/div << ')';
const int ratio[2] = {res.first/div, res.second/div};
if (ratio[0] <= 10 || ratio[1] <= 10)
option << " (" << ratio[0] << ':' << ratio[1] << ')';
options.push_back(option.str());
}

Expand Down

0 comments on commit 9e34f5d

Please sign in to comment.