joevenzon Wrote:It's been a while since I wrote that code, but I believe the reason things are done this way rather than by using the SDL_ListModes function directly was that you get really unreliable behavior if you're running in a window rather than full screen -- like it'll just show one resolution for you to pick from.
thats very weird. i wanted to start working on this and uncommented your code, and see it already worked perfectly fine, fullscreen or windowed. actually since SDL_FULLSCREEN is already always passed (like i suggested) so it can't make a difference if you are running in a window(actually there was a small bug in the code since it forgot to copy some of the resolutions that SDL_ListModes provided)
joevenzon Wrote:If you've got SVN access, do a quick branch of the code and get it set up how you're saying.
hm it sounds like a bit of overkill doing a branch for that little change.i've changed just the MENU::Load() method to:<pre>void MENU::Load(){ if (loaded) return; backbox = utility.TexLoad("gui/box.png", GL_RGBA, false); logo = utility.TexLoad("gui/vdrift-logo.png", GL_RGBA, false); //tach = utility.TexLoad("tachometer.png", GL_RGBA, false); //load reflection map used for car display sphere_reflection = utility.TexLoad("gui/refmap.png", false); int i; SDL_Rect **tmodes; /* Get available fullscreen/hardware modes */ tmodes = SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE); disp_data.num_modes = 0; /* Print valid modes */ for(i=0; tmodes[i]; ++i) disp_data.num_modes++; disp_data.modes = new SDL_Rect [disp_data.num_modes]; for (i = 0; i < disp_data.num_modes; i++) { disp_data.modes[i].w = tmodes[i]->w; disp_data.modes[i].h = tmodes[i]->h; } //load car parts list for customization menu string part; //bool found; ifstream vmf; vmf.clear(); vmf.open(settings.GetFullDataPath("carparts/parts_list").c_str()); while( getline(vmf, part, '\n') ) { parts.push_back(part); parts_names.push_back(settings.GetCarPartName(part)); //cout << "Part pathname: " << part << endl; } ReloadCarParts(); //load control ui BuildControls(); //load lists BuildCFList(); BuildTSList(); //load generic pages numpages = 32; pageslot = 0; page = new MENU_PAGE [numpages]; LoadPage("About"); LoadPage("AutoClutch"); LoadPage("ControlOpts"); LoadPage("Deadzone"); LoadPage("Help1"); LoadPage("JoyType"); LoadPage("Main"); LoadPage("MouseSettings"); LoadPage("MouseXAxisSensitivity"); LoadPage("MouseYAxisDeadzone"); LoadPage("MouseYAxisSensitivity"); LoadPage("NextRelease"); LoadPage("Options"); LoadPage("QuitConfirm"); LoadPage("Replay"); LoadPage("TouchComp"); LoadPage("ResetBestLapTime"); LoadPage("RestartConfirm"); LoadPage("Tools"); LoadPage("NewGameSetup"); LoadPage("SelectMode"); LoadPage("SoundSettings"); LoadPage("SoundVolume"); LoadPage("ConnectionError"); LoadPage("DisplaySettings"); LoadPage("InputSettings"); LoadPage("TreeDetail"); LoadPage("TerrainDetail"); LoadPage("TexSize"); LoadPage("MPHorKPH"); LoadPage("QuitToChange"); LoadPage("ViewDistance"); loaded = true;}</pre>