summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp5
-rw-r--r--src/defaults.cpp3
-rw-r--r--src/gui/setup_visual.cpp5
3 files changed, 12 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 7c059d968..3d4e2a37d 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -343,7 +343,10 @@ void Client::gameInit()
#endif
#if defined(WIN32) || defined(__APPLE__)
- putenv("SDL_VIDEO_CENTERED=1");
+ if (config.getBoolValue("centerwindow"))
+ putenv("SDL_VIDEO_CENTERED=1");
+ else
+ putenv("SDL_VIDEO_CENTERED=0");
#endif
chatLogger = new ChatLogger;
diff --git a/src/defaults.cpp b/src/defaults.cpp
index f29d304da..5b4641f1a 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -244,6 +244,9 @@ DefaultsData* getConfigDefaults()
AddDEF(configData, "downloadProxy", "");
AddDEF(configData, "downloadProxyType", 0);
AddDEF(configData, "blur", true);
+#if defined(WIN32) || defined(__APPLE__)
+ AddDEF(configData, "centerwindow", true);
+#endif
return configData;
}
diff --git a/src/gui/setup_visual.cpp b/src/gui/setup_visual.cpp
index 368ceeee8..8cd052dd7 100644
--- a/src/gui/setup_visual.cpp
+++ b/src/gui/setup_visual.cpp
@@ -98,6 +98,11 @@ Setup_Visual::Setup_Visual()
new SetupItemSlider2(_("Vsync"), "", "vsync", this,
"vsyncEvent", 0, 2, mVSyncList);
+#if defined(WIN32) || defined(__APPLE__)
+ new SetupItemCheckBox(_("Center game window"),
+ "", "centerwindow", this, "centerwindowEvent");
+#endif
+
setDimension(gcn::Rectangle(0, 0, 550, 350));
}