projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b315f1f
)
Fix for SDL double-reporting display modes
author
Tobias Markus
<tobbi@mozilla-uk.org>
Wed, 13 Aug 2014 12:29:13 +0000
(14:29 +0200)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Wed, 13 Aug 2014 12:29:13 +0000
(14:29 +0200)
src/supertux/menu/options_menu.cpp
patch
|
blob
|
history
diff --git
a/src/supertux/menu/options_menu.cpp
b/src/supertux/menu/options_menu.cpp
index
58ebf40
..
c0991c2
100644
(file)
--- a/
src/supertux/menu/options_menu.cpp
+++ b/
src/supertux/menu/options_menu.cpp
@@
-103,6
+103,7
@@
OptionsMenu::OptionsMenu(bool complete)
}
int display_mode_count = SDL_GetNumDisplayModes(0);
+ std::string last_display_mode;
for(int i = 0; i < display_mode_count; ++i)
{
SDL_DisplayMode mode;
@@
-115,6
+116,9
@@
OptionsMenu::OptionsMenu(bool complete)
{
std::ostringstream out;
out << mode.w << "x" << mode.h << "@" << mode.refresh_rate;
+ if(last_display_mode == out.str())
+ continue;
+ last_display_mode = out.str();
fullscreen_res->list.push_back(out.str());
}
}