diff options
author | Kostadin Damyanov <maxmight@gmail.com> | 2015-06-18 22:48:29 +0300 |
---|---|---|
committer | Kostadin Damyanov <maxmight@gmail.com> | 2015-06-18 22:48:29 +0300 |
commit | 0038e27fc39a422601bc220d8359ff9d98fd604d (patch) | |
tree | 75e24e1959184e3dae79d73947bc615090b8b0af /platform/windows | |
parent | f10eb8ffa1a7f6bee9b5228ea1204fd93844e4cc (diff) | |
parent | 37af8b413674936518a2ebe180f9e7bfcd5795bb (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/detect.py | 6 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 39 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 6 |
3 files changed, 43 insertions, 8 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 298fa3bc78..0fe4f9f3b5 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -201,6 +201,12 @@ def configure(env): env.Append(CCFLAGS=['/O2','/DDEBUG_ENABLED'])
env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE'])
+ elif (env["target"]=="debug_release"):
+
+ env.Append(CCFLAGS=['/Zi','/Od'])
+ env.Append(LINKFLAGS=['/DEBUG'])
+ env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS'])
+ env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup'])
elif (env["target"]=="debug"):
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 1350719778..ec9e17c4f0 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1177,7 +1177,7 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ physics_server = memnew( PhysicsServerSW ); physics_server->init(); - physics_2d_server = memnew( Physics2DServerSW ); + physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>(); physics_2d_server->init(); if (!is_no_window_mode_enabled()) { @@ -1375,6 +1375,9 @@ void OS_Windows::finalize() { physics_2d_server->finish(); memdelete(physics_2d_server); + joystick_change_queue.clear(); + monitor_info.clear(); + } void OS_Windows::finalize_core() { @@ -1826,10 +1829,14 @@ String OS_Windows::get_name() { return "Windows"; } -OS::Date OS_Windows::get_date() const { +OS::Date OS_Windows::get_date(bool utc) const { SYSTEMTIME systemtime; - GetSystemTime(&systemtime); + if (utc) + GetSystemTime(&systemtime); + else + GetLocalTime(&systemtime); + Date date; date.day=systemtime.wDay; date.month=Month(systemtime.wMonth); @@ -1838,10 +1845,13 @@ OS::Date OS_Windows::get_date() const { date.dst=false; return date; } -OS::Time OS_Windows::get_time() const { +OS::Time OS_Windows::get_time(bool utc) const { SYSTEMTIME systemtime; - GetLocalTime(&systemtime); + if (utc) + GetSystemTime(&systemtime); + else + GetLocalTime(&systemtime); Time time; time.hour=systemtime.wHour; @@ -1850,6 +1860,23 @@ OS::Time OS_Windows::get_time() const { return time; } +OS::TimeZoneInfo OS_Windows::get_time_zone_info() const { + TIME_ZONE_INFORMATION info; + bool daylight = false; + if (GetTimeZoneInformation(&info) == TIME_ZONE_ID_DAYLIGHT) + daylight = true; + + TimeZoneInfo ret; + if (daylight) { + ret.name = info.DaylightName; + } else { + ret.name = info.StandardName; + } + + ret.bias = info.Bias; + return ret; +} + uint64_t OS_Windows::get_unix_time() const { FILETIME ft; @@ -2052,7 +2079,7 @@ String OS_Windows::get_executable_path() const { wchar_t bufname[4096]; GetModuleFileNameW(NULL,bufname,4096); String s= bufname; - print_line("EXEC PATHP¨®: "+s); + print_line("EXEC PATHP??: "+s); return s; } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 2e3700da6a..31e030d02e 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -45,6 +45,7 @@ #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" #include "drivers/unix/ip_unix.h" #include "servers/physics_2d/physics_2d_server_sw.h" +#include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include <windows.h> @@ -258,8 +259,9 @@ public: virtual String get_name(); - virtual Date get_date() const; - virtual Time get_time() const; + virtual Date get_date(bool utc) const; + virtual Time get_time(bool utc) const; + virtual TimeZoneInfo get_time_zone_info() const; virtual uint64_t get_unix_time() const; virtual bool can_draw() const; |