mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 20:06:49 +01:00
Only update the RenderingServer from the Main Thread while in debug break.
This commit is contained in:
parent
e98b2a954b
commit
840e36c341
@ -377,11 +377,14 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue,
|
|||||||
|
|
||||||
// This is for the camera override to stay live even when the game is paused from the editor
|
// This is for the camera override to stay live even when the game is paused from the editor
|
||||||
loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f;
|
loop_time_sec = (OS::get_singleton()->get_ticks_usec() - loop_begin_usec) / 1000000.0f;
|
||||||
|
|
||||||
|
if (Thread::is_main_thread()) {
|
||||||
RenderingServer::get_singleton()->sync();
|
RenderingServer::get_singleton()->sync();
|
||||||
if (RenderingServer::get_singleton()->has_changed()) {
|
if (RenderingServer::get_singleton()->has_changed()) {
|
||||||
RenderingServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale());
|
RenderingServer::get_singleton()->draw(true, loop_time_sec * Engine::get_singleton()->get_time_scale());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
packet_peer_stream->put_var("debug_exit");
|
packet_peer_stream->put_var("debug_exit");
|
||||||
|
Loading…
Reference in New Issue
Block a user