+ MenuItem* fullscreen_res = add_string_select(MNID_FULLSCREEN_RESOLUTION, _("Resolution"));
+ fullscreen_res->set_help(_("Change the Resolution to be used in Fullscreen Mode, you have to toggle fullscreen mode to let this change take effect"));
+
+ MenuItem* maginfication = add_string_select(MNID_MAGINFICATION, _("Maginfication"));
+ maginfication->set_help(_("Change the magnification of the game area"));
+
+ // These values go from screen:640/projection:1600 to screen:1600/projection:640
+ maginfication->list.push_back("40%");
+ maginfication->list.push_back("50%");
+ maginfication->list.push_back("62.5%");
+ maginfication->list.push_back("80%");
+ maginfication->list.push_back("100%");
+ maginfication->list.push_back("125%");
+ maginfication->list.push_back("160%");
+ maginfication->list.push_back("200%");
+ maginfication->list.push_back("250%");
+
+ SDL_Rect** modes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_OPENGL);
+
+ if (modes == (SDL_Rect **)0)
+ { // No resolutions at all available, bad
+
+ }
+ else if(modes == (SDL_Rect **)-1)
+ { // All resolutions sould work, so we fall back to hardcoded defaults
+ fullscreen_res->list.push_back("640x480");
+ fullscreen_res->list.push_back("800x600");
+ fullscreen_res->list.push_back("1024x768");
+ fullscreen_res->list.push_back("1152x864");
+ fullscreen_res->list.push_back("1280x960");
+ fullscreen_res->list.push_back("1280x1024");
+ fullscreen_res->list.push_back("1440x900");
+ fullscreen_res->list.push_back("1680x1050");
+ fullscreen_res->list.push_back("1600x1200");
+ fullscreen_res->list.push_back("1920x1080");
+ fullscreen_res->list.push_back("1920x1200");
+ }
+ else
+ {
+ for(int i = 0; modes[i]; ++i)
+ {
+ std::ostringstream out;
+ out << modes[i]->w << "x" << modes[i]->h;
+ fullscreen_res->list.push_back(out.str());
+ }
+ }
+
+ MenuItem* aspect = add_string_select(MNID_ASPECTRATIO, _("Aspect Ratio"));