diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-05 21:27:49 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-05 21:27:49 +0000 |
commit | 454b4b759345ce1fed0d2ee61733975fe3d84017 (patch) | |
tree | 1c20e4c78d7b84ced44b6542d748eddf6c077abd /src/gui/setup.cpp | |
parent | f381620a6bdbc956cbfdd7f7e29f6539f6ce58c9 (diff) | |
download | mana-454b4b759345ce1fed0d2ee61733975fe3d84017.tar.gz mana-454b4b759345ce1fed0d2ee61733975fe3d84017.tar.bz2 mana-454b4b759345ce1fed0d2ee61733975fe3d84017.tar.xz mana-454b4b759345ce1fed0d2ee61733975fe3d84017.zip |
Cleaning and fixing setup window
Diffstat (limited to 'src/gui/setup.cpp')
-rw-r--r-- | src/gui/setup.cpp | 59 |
1 files changed, 18 insertions, 41 deletions
diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 85aa900d..a8c4721e 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -190,53 +190,30 @@ void Setup::action(const std::string &eventId) else if (eventId == "apply") { setVisible(false); - - // Select video mode - sel = modeList->getSelected(); - - if (sel != last_sel) { - last_sel = sel; - screen = SDL_SetVideoMode(modes[sel]->w, modes[sel]->h, 32, - SDL_FULLSCREEN | SDL_HWSURFACE); - } - - // Display settings - if (fsCheckBox->isMarked() && config.getValue("screen", 0) == 0) - { + + /*screenW = modes[sel]->w; + screenH = modes[sel]->h;*/ + + if (fsCheckBox->isMarked()) { // Fullscreen config.setValue("screen", 1); -#if __USE_UNIX98 - SDL_WM_ToggleFullScreen(screen); -#else - int displayFlags = 0; displayFlags |= SDL_FULLSCREEN; - if ((int)config.getValue("hwaccel", 0)) { - displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF; - } - else { - displayFlags |= SDL_SWSURFACE; - } - screen = SDL_SetVideoMode(modes[sel]->w, modes[sel]->h, 32, - displayFlags); -#endif - } - else if (!fsCheckBox->isMarked() && config.getValue("screen", 0) == 1) - { + else { // Windowed config.setValue("screen", 0); -#if __USE_UNIX98 - SDL_WM_ToggleFullScreen(screen); + displayFlags &= ~SDL_FULLSCREEN; + } + + screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags); + +/* if (displayFlags & SDL_FULLSCREEN) { +#ifdef WIN32 + displayFlags ^= SDL_FULLSCREEN; + screen = SDL_SetVideoMode(screenW, screenH, bitDepth, displayFlags); #else - int displayFlags = 0; - if ((int)config.getValue("hwaccel", 0)) { - displayFlags |= SDL_HWSURFACE | SDL_DOUBLEBUF; - } - else { - displayFlags |= SDL_SWSURFACE; - } - screen = SDL_SetVideoMode(modes[sel]->w, modes[sel]->h, 32, - displayFlags); + SDL_WM_ToggleFullScreen(screen); #endif - } + }*/ + // Sound settings if (soundCheckBox->isMarked()) { |