summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorhurikhan <m4r10.5ch14ck@gmail.com>2015-01-11 01:07:23 +0800
committerhurikhan <m4r10.5ch14ck@gmail.com>2015-01-11 01:07:23 +0800
commita8e3c5c0b7fb202bcceb06b9373b5b6a4ff8f9b8 (patch)
treed41eb4947cbe781601e6d84ba365732bde12e95e /main
parent5d9de48d8d35961835135a7310840cdc9cbacb63 (diff)
First attempt of restoring the window at the old position
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index f0e376a045..b6638a3ad0 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -609,6 +609,10 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
if (video_driver=="") // specified in engine.cfg
video_driver=_GLOBAL_DEF("display/driver",Variant((const char*)OS::get_singleton()->get_video_driver_name(0)));
+ if (!force_res && use_custom_res && globals->has("display/x"))
+ video_mode.width=globals->get("display/y");
+ if (!force_res && use_custom_res && globals->has("display/width"))
+ video_mode.width=globals->get("display/width");
if (!force_res && use_custom_res && globals->has("display/width"))
video_mode.width=globals->get("display/width");
if (!force_res &&use_custom_res && globals->has("display/height"))
@@ -627,7 +631,8 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas
}
}
-
+ GLOBAL_DEF("display/x",video_mode.x);
+ GLOBAL_DEF("display/y",video_mode.y);
GLOBAL_DEF("display/width",video_mode.width);
GLOBAL_DEF("display/height",video_mode.height);
GLOBAL_DEF("display/fullscreen",video_mode.fullscreen);