From df2a2e3e41b24068b31392b624efbd126b70532f Mon Sep 17 00:00:00 2001 From: sonil Date: Sun, 18 Jun 2023 13:16:19 +0800 Subject: [PATCH 1/2] Fix the bug that the mouse occasionally disappears after the round ends --- src/game_mouse.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_mouse.cc b/src/game_mouse.cc index 193ee4f..821d394 100644 --- a/src/game_mouse.cc +++ b/src/game_mouse.cc @@ -1280,7 +1280,7 @@ int gameMouseSetCursor(int cursor) } unsigned int delay = 1000 / artGetFramesPerSecond(mouseCursorFrm); - if (getTicksBetween(tick, gGameMouseAnimatedCursorLastUpdateTimestamp) < delay) { + if (getTicksBetween(tick, gGameMouseAnimatedCursorLastUpdateTimestamp) < delay && cursor == gGameMouseCursor) { shouldUpdate = false; } else { if (artGetFrameCount(mouseCursorFrm) <= gGameMouseAnimatedCursorNextFrame) { From ac495cf7ada689b3e06499c24e227529fdbf30b5 Mon Sep 17 00:00:00 2001 From: sonil Date: Sun, 18 Jun 2023 19:40:29 +0800 Subject: [PATCH 2/2] Fixed mouse freezing in combat during NPC turns when using touchscreen --- src/combat.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/combat.cc b/src/combat.cc index 6d28fe0..9c37314 100644 --- a/src/combat.cc +++ b/src/combat.cc @@ -2629,7 +2629,7 @@ static void _combat_begin(Object* a1) reg_anim_end(); while (animationIsBusy(v1)) { - _process_bk(); + inputGetInput(); } } } @@ -2796,7 +2796,7 @@ static void _combat_over() reg_anim_end(); while (animationIsBusy(critter)) { - _process_bk(); + inputGetInput(); } } } @@ -3113,7 +3113,7 @@ void _combat_turn_run() while (_combat_turn_running > 0) { sharedFpsLimiter.mark(); - _process_bk(); + inputGetInput(); renderPresent(); sharedFpsLimiter.throttle();