From 6faa76d28758e9bea6e2cbfb8c7fa985c4bed1d5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 23 Mar 2006 03:40:23 +0000 Subject: Made mouse more responsive svn-id: r21413 --- engines/cine/main_loop.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'engines/cine/main_loop.cpp') diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 1a90a1af9f..24227f169c 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -41,7 +41,7 @@ uint16 mouseLeft = 0; uint16 mouseUpdateStatus; uint16 dummyU16; -void manageEvents(void) { +void manageEvents(int count) { OSystem::Event event; while (g_system->pollEvent(event)) { @@ -64,11 +64,20 @@ void manageEvents(void) { } } - mouseData.left = mouseLeft; - mouseData.right = mouseRight; + if (count) { + mouseData.left = mouseLeft; + mouseData.right = mouseRight; + mouseLeft = 0; + mouseRight = 0; + } + + int i; - mouseLeft = 0; - mouseRight = 0; + for (i = 0; i < count; i++) { + g_system->updateScreen(); + g_system->delayMillis(10); + manageEvents(0); + } } void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) { -- cgit v1.2.3