aboutsummaryrefslogtreecommitdiff
path: root/backends/events
diff options
context:
space:
mode:
authorCameron Cawley2019-03-31 19:07:40 +0100
committerFilippos Karapetis2019-04-15 08:06:39 +0300
commitbcef809e612177c2bcb7ca3f8682ea96d38c4cdc (patch)
tree14bc067ff02ef2e1aabd19360db67e22deb8704f /backends/events
parent82f4ee86a9824a9cdfd5060d7bab23be381a46df (diff)
downloadscummvm-rg350-bcef809e612177c2bcb7ca3f8682ea96d38c4cdc.tar.gz
scummvm-rg350-bcef809e612177c2bcb7ca3f8682ea96d38c4cdc.tar.bz2
scummvm-rg350-bcef809e612177c2bcb7ca3f8682ea96d38c4cdc.zip
WINCE: Fix compilation
Diffstat (limited to 'backends/events')
-rw-r--r--backends/events/wincesdl/wincesdl-events.cpp18
-rw-r--r--backends/events/wincesdl/wincesdl-events.h2
2 files changed, 14 insertions, 6 deletions
diff --git a/backends/events/wincesdl/wincesdl-events.cpp b/backends/events/wincesdl/wincesdl-events.cpp
index c949d1c41c..a7ffb1eadb 100644
--- a/backends/events/wincesdl/wincesdl-events.cpp
+++ b/backends/events/wincesdl/wincesdl-events.cpp
@@ -43,7 +43,7 @@ void WINCESdlEventSource::init(WINCESdlGraphicsManager *graphicsMan) {
_graphicsMan = graphicsMan;
}
-void WINCESdlEventSource::processMouseEvent(Common::Event &event, int x, int y) {
+bool WINCESdlEventSource::processMouseEvent(Common::Event &event, int x, int y) {
event.mouse.x = x;
event.mouse.y = y;
@@ -57,6 +57,8 @@ void WINCESdlEventSource::processMouseEvent(Common::Event &event, int x, int y)
event.mouse.x = event.mouse.x * _graphicsMan->_scaleFactorXd / _graphicsMan->_scaleFactorXm;
event.mouse.y = event.mouse.y * _graphicsMan->_scaleFactorYd / _graphicsMan->_scaleFactorYm;
+
+ return true;
}
bool WINCESdlEventSource::pollEvent(Common::Event &event) {
@@ -69,7 +71,7 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
memset(&event, 0, sizeof(Common::Event));
- if (handleKbdMouse(event) {
+ if (handleKbdMouse(event)) {
return true;
}
@@ -155,7 +157,9 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
case SDL_MOUSEMOTION:
event.type = Common::EVENT_MOUSEMOVE;
- processMouseEvent(event, ev.motion.x, ev.motion.y);
+ if (!processMouseEvent(event, ev.motion.x, ev.motion.y)) {
+ return false;
+ }
// update KbdMouse
_km.x = ev.motion.x * MULTIPLIER;
_km.y = ev.motion.y * MULTIPLIER;
@@ -171,7 +175,9 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
event.type = Common::EVENT_RBUTTONDOWN;
else
break;
- processMouseEvent(event, ev.button.x, ev.button.y);
+ if (!processMouseEvent(event, ev.button.x, ev.button.y)) {
+ return false;
+ }
// update KbdMouse
_km.x = ev.button.x * MULTIPLIER;
_km.y = ev.button.y * MULTIPLIER;
@@ -249,7 +255,9 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {
_rbutton = false;
}
- processMouseEvent(event, ev.button.x, ev.button.y);
+ if (!processMouseEvent(event, ev.button.x, ev.button.y)) {
+ return false;
+ }
// update KbdMouse
_km.x = ev.button.x * MULTIPLIER;
_km.y = ev.button.y * MULTIPLIER;
diff --git a/backends/events/wincesdl/wincesdl-events.h b/backends/events/wincesdl/wincesdl-events.h
index 38327681a5..0f38f6753e 100644
--- a/backends/events/wincesdl/wincesdl-events.h
+++ b/backends/events/wincesdl/wincesdl-events.h
@@ -43,7 +43,7 @@ public:
// Overloaded from SDL backend (toolbar handling)
bool pollEvent(Common::Event &event);
// Overloaded from SDL backend (mouse and new scaler handling)
- void processMouseEvent(Common::Event &event, int x, int y);
+ bool processMouseEvent(Common::Event &event, int x, int y);
protected: