summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-01-22 13:17:39 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-01-22 13:17:39 -0300
commit0c9fd3c4b4f0cd22c6d887daf70bb882e2a00605 (patch)
tree7979ce95c15edab4a443d6e39a6aeffec6dee082 /platform
parentc70c43c8885006d64224b08ea02e05af13827d73 (diff)
Avoid cyclic iteration check, fixes #24969
Diffstat (limited to 'platform')
-rw-r--r--platform/osx/os_osx.mm4
-rw-r--r--platform/windows/os_windows.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index ddd98ab88c..760858b2e5 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -304,7 +304,9 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto
if (OS_OSX::singleton->main_loop) {
Main::force_redraw();
//Event retrieval blocks until resize is over. Call Main::iteration() directly.
- Main::iteration();
+ if (!Main::is_iterating()) { //avoid cyclic loop
+ Main::iteration();
+ }
}
/*
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 3b41f1b901..d1693cb0b4 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -783,7 +783,9 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_TIMER: {
if (wParam == move_timer_id) {
process_key_events();
- Main::iteration();
+ if (!Main::is_iterating()) {
+ Main::iteration();
+ }
}
} break;