aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.h
diff options
context:
space:
mode:
authorColin Snover2017-07-03 15:26:24 -0500
committerColin Snover2017-07-06 19:12:37 -0500
commit35346bc71bbe8dd122e8167d6850e1fdc3280038 (patch)
tree496a685c9fa50eb085d7be32f28f65af4ea4d976 /engines/sci/graphics/frameout.h
parent1466fb247e9f24bfcc61e977e71602fadf26c148 (diff)
downloadscummvm-rg350-35346bc71bbe8dd122e8167d6850e1fdc3280038.tar.gz
scummvm-rg350-35346bc71bbe8dd122e8167d6850e1fdc3280038.tar.bz2
scummvm-rg350-35346bc71bbe8dd122e8167d6850e1fdc3280038.zip
SCI32: Update mouse position for rendering in all frameOuts
Diffstat (limited to 'engines/sci/graphics/frameout.h')
-rw-r--r--engines/sci/graphics/frameout.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index ab58f41144..1585a3440a 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -24,6 +24,7 @@
#define SCI_GRAPHICS_FRAMEOUT_H
#include "engines/util.h" // for initGraphics
+#include "sci/event.h"
#include "sci/graphics/plane32.h"
#include "sci/graphics/screen_item32.h"
@@ -370,6 +371,17 @@ public:
#pragma mark -
#pragma mark Mouse cursor
private:
+ void updateMousePositionForRendering() const {
+ // In SSCI, mouse events were received via hardware interrupt, so the
+ // mouse cursor would always get updated immediately when the user moved
+ // the mouse. ScummVM must poll for mouse events from the backend
+ // instead, so we poll just before rendering so that the latest mouse
+ // position is rendered instead of whatever position it was at the last
+ // time kGetEvent was called. Without this, the mouse appears stuck
+ // during loops that do not make calls to kGetEvent, like transitions.
+ g_sci->getEventManager()->getSciEvent(SCI_EVENT_PEEK);
+ }
+
/**
* Determines whether or not the point given by
* `position` is inside of the given screen item.