From 9df77d276593ef7082e3971d1c180b8f74b0cb2e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 26 May 2015 01:05:08 -0300 Subject: ability to run 2D physics in a thread also, 2D physics is now thread safe too. see physics_2d/thread_model --- platform/windows/os_windows.cpp | 7 +++++-- platform/windows/os_windows.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'platform/windows') diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 1350719778..4e8f9fcd9b 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(); 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() { @@ -2052,7 +2055,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..64fbbf23c0 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 -- cgit v1.2.3