summaryrefslogtreecommitdiff
path: root/src/gui/setup.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-05 21:27:49 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-05 21:27:49 +0000
commit454b4b759345ce1fed0d2ee61733975fe3d84017 (patch)
tree1c20e4c78d7b84ced44b6542d748eddf6c077abd /src/gui/setup.cpp
parentf381620a6bdbc956cbfdd7f7e29f6539f6ce58c9 (diff)
downloadmana-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.cpp59
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()) {