#include "supertux/menu/language_menu.hpp"
#include "supertux/menu/menu_storage.hpp"
#include "supertux/menu/profile_menu.hpp"
+#include "util/string_util.hpp"
#include "video/renderer.hpp"
+#include <algorithm>
+#include <sstream>
+
enum OptionsMenuIDs {
MNID_FULLSCREEN,
MNID_FULLSCREEN_RESOLUTION,
// These values go from screen:640/projection:1600 to
// screen:1600/projection:640 (i.e. 640, 800, 1024, 1280, 1600)
- magnification->list.push_back("auto");
+ magnification->list.push_back(_("auto"));
magnification->list.push_back("40%");
magnification->list.push_back("50%");
magnification->list.push_back("62.5%");
out << modes[i]->w << "x" << modes[i]->h;
fullscreen_res->list.push_back(out.str());
}
+
+ // On Ubuntu/Linux resolutions are returned from highest to
+ // lowest, so reverse them
+ std::sort(fullscreen_res->list.begin(), fullscreen_res->list.end(), StringUtil::numeric_less);
}
MenuItem* aspect = add_string_select(MNID_ASPECTRATIO, _("Aspect Ratio"));
aspect->set_help(_("Adjust the aspect ratio"));
- aspect->list.push_back("auto");
+ aspect->list.push_back(_("auto"));
aspect->list.push_back("5:4");
aspect->list.push_back("4:3");
aspect->list.push_back("16:10");
switch (item->id) {
case MNID_ASPECTRATIO:
{
- if (item->list[item->selected] == "auto")
+ if (item->list[item->selected] == _("auto"))
{
g_config->aspect_size = Size(0, 0); // Magic values
Renderer::instance()->apply_config();
break;
case MNID_MAGNIFICATION:
- if (item->list[item->selected] == "auto")
+ if (item->list[item->selected] == _("auto"))
{
g_config->magnification = 0.0f; // Magic value
}