Skip to content

Commit

Permalink
Small cleanup to preferences::resolution()
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 3, 2016
1 parent ba51524 commit 7b2fb55
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/preferences.cpp
Expand Up @@ -349,14 +349,11 @@ std::pair<int,int> resolution()
{
const std::string postfix = fullscreen() ? "resolution" : "windowsize";
std::string x = prefs['x' + postfix], y = prefs['y' + postfix];
if (!x.empty() && !y.empty()) {
std::pair<int,int> res(std::max(atoi(x.c_str()), min_allowed_width()),
std::max(atoi(y.c_str()), min_allowed_height()));

// Make sure resolutions are always divisible by 4
//res.first &= ~3;
//res.second &= ~3;
return res;
if (!x.empty() && !y.empty()) {
return std::make_pair(
std::max(atoi(x.c_str()), min_allowed_width()),
std::max(atoi(y.c_str()), min_allowed_height()));
} else {
return std::pair<int,int>(1024,768);
}
Expand Down

0 comments on commit 7b2fb55

Please sign in to comment.