diff --git a/libid/engine/jiim.cpp b/libid/engine/jiim.cpp index 495919779..e8d1618ed 100644 --- a/libid/engine/jiim.cpp +++ b/libid/engine/jiim.cpp @@ -1194,7 +1194,13 @@ bool InverseJulia::iterate() { bool still{true}; bool mouse_updated{}; - if (m_actively_computing) + if (s_cursor.get_x() != g_col || s_cursor.get_y() != g_row) + { + g_col = s_cursor.get_x(); + g_row = s_cursor.get_y(); + mouse_updated = true; + } + if (m_actively_computing || mouse_updated) { s_cursor.check_blink(); } @@ -1202,12 +1208,6 @@ bool InverseJulia::iterate() { s_cursor.wait_key(); } - if (s_cursor.get_x() != g_col || s_cursor.get_y() != g_row) - { - g_col = s_cursor.get_x(); - g_row = s_cursor.get_y(); - mouse_updated = true; - } if (driver_key_pressed() || m_first_time || mouse_updated) { m_first_time = false; diff --git a/libid/include/ui/editpal.h b/libid/include/ui/editpal.h index d444f00f6..051301cfd 100644 --- a/libid/include/ui/editpal.h +++ b/libid/include/ui/editpal.h @@ -53,6 +53,7 @@ class CrossHairCursor int m_hidden; // >0 if mouse hidden long m_last_blink; bool m_blink; + bool m_pos_updated{}; char m_top[CURSOR_SIZE]; // save line segments here char m_bottom[CURSOR_SIZE]; char m_left[CURSOR_SIZE]; diff --git a/libid/ui/editpal.cpp b/libid/ui/editpal.cpp index 889ef6adb..98f602a12 100644 --- a/libid/ui/editpal.cpp +++ b/libid/ui/editpal.cpp @@ -1101,6 +1101,7 @@ void CrossHairCursor::set_pos(int x, int y) m_x = x; m_y = y; + m_pos_updated = true; if (!m_hidden) { @@ -1170,10 +1171,11 @@ void CrossHairCursor::check_blink() int CrossHairCursor::wait_key() { - while (!driver_wait_key_pressed(true)) + while (!driver_wait_key_pressed(true) && !m_pos_updated) { check_blink(); } + m_pos_updated = false; return driver_key_pressed(); }