|
19 | 19 | #include "HAL/PlatformApplicationMisc.h" |
20 | 20 | #endif |
21 | 21 |
|
| 22 | +#include "Runtime/Launch/Public/LaunchEngineLoop.h" |
| 23 | + |
22 | 24 |
|
23 | 25 | PyObject *py_unreal_engine_log(PyObject * self, PyObject * args) |
24 | 26 | { |
@@ -479,21 +481,38 @@ PyObject *py_unreal_engine_guid_to_string(PyObject * self, PyObject * args) |
479 | 481 |
|
480 | 482 | PyObject *py_unreal_engine_slate_tick(PyObject * self, PyObject * args) |
481 | 483 | { |
| 484 | + Py_BEGIN_ALLOW_THREADS; |
482 | 485 | FSlateApplication::Get().PumpMessages(); |
483 | 486 | FSlateApplication::Get().Tick(); |
| 487 | + Py_END_ALLOW_THREADS; |
484 | 488 | Py_RETURN_NONE; |
485 | 489 | } |
486 | 490 |
|
487 | 491 | PyObject *py_unreal_engine_engine_tick(PyObject * self, PyObject * args) |
488 | 492 | { |
489 | 493 | float delta_seconds = FApp::GetDeltaTime(); |
490 | | - PyObject *py_bool = nullptr; |
491 | | - if (!PyArg_ParseTuple(args, "|fO:engine_tick", &delta_seconds, &py_bool)) |
| 494 | + PyObject *py_idle = nullptr; |
| 495 | + if (!PyArg_ParseTuple(args, "|fO:engine_tick", &delta_seconds, &py_idle)) |
492 | 496 | { |
493 | | - return NULL; |
| 497 | + return nullptr; |
494 | 498 | } |
495 | 499 |
|
496 | | - GEngine->Tick(delta_seconds, (py_bool && PyObject_IsTrue(py_bool)) ? true : false); |
| 500 | + bool bIdle = false; |
| 501 | + if (py_idle && PyObject_IsTrue(py_idle)) |
| 502 | + bIdle = true; |
| 503 | + |
| 504 | + Py_BEGIN_ALLOW_THREADS; |
| 505 | + GEngine->Tick(delta_seconds, bIdle); |
| 506 | + Py_END_ALLOW_THREADS; |
| 507 | + |
| 508 | + Py_RETURN_NONE; |
| 509 | +} |
| 510 | + |
| 511 | +PyObject *py_unreal_engine_tick_rendering_tickables(PyObject * self, PyObject * args) |
| 512 | +{ |
| 513 | + Py_BEGIN_ALLOW_THREADS; |
| 514 | + TickRenderingTickables(); |
| 515 | + Py_END_ALLOW_THREADS; |
497 | 516 |
|
498 | 517 | Py_RETURN_NONE; |
499 | 518 | } |
@@ -1250,7 +1269,7 @@ PyObject *py_unreal_engine_clipboard_copy(PyObject * self, PyObject * args) |
1250 | 1269 | FGenericPlatformMisc::ClipboardCopy(UTF8_TO_TCHAR(text)); |
1251 | 1270 | #endif |
1252 | 1271 | Py_RETURN_NONE; |
1253 | | -} |
| 1272 | + } |
1254 | 1273 |
|
1255 | 1274 | PyObject *py_unreal_engine_clipboard_paste(PyObject * self, PyObject * args) |
1256 | 1275 | { |
|
0 commit comments