Skip to content

Commit

Permalink
WINCE: Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 authored and bluegr committed Apr 15, 2019
1 parent 82f4ee8 commit bcef809
Show file tree
Hide file tree
Showing 24 changed files with 116 additions and 142 deletions.
18 changes: 13 additions & 5 deletions backends/events/wincesdl/wincesdl-events.cpp
Expand Up @@ -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;

Expand All @@ -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) {
Expand All @@ -69,7 +71,7 @@ bool WINCESdlEventSource::pollEvent(Common::Event &event) {

memset(&event, 0, sizeof(Common::Event));

if (handleKbdMouse(event) {
if (handleKbdMouse(event)) {
return true;
}

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion backends/events/wincesdl/wincesdl-events.h
Expand Up @@ -43,7 +43,7 @@ class WINCESdlEventSource : public SdlEventSource {
// 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:

Expand Down
3 changes: 3 additions & 0 deletions backends/fs/stdiostream.cpp
Expand Up @@ -26,6 +26,9 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL

#include "backends/fs/stdiostream.h"
#ifdef _WIN32_WCE
#include "backends/platform/wince/missing/fopen.h"
#endif

StdioStream::StdioStream(void *handle) : _handle(handle) {
assert(handle);
Expand Down
2 changes: 1 addition & 1 deletion backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
Expand Up @@ -207,7 +207,7 @@ void DINGUXSdlGraphicsManager::internUpdateScreen() {
ScalerProc *scalerProc;
int scale1;

#if defined(DEBUG) && ! defined(_WIN32_WCE) // definitions not available for non-DEBUG here. (needed this to compile in SYMBIAN32 & linux?)
#if defined(DEBUG)
assert(_hwScreen != NULL);
assert(_hwScreen->map->sw_data != NULL);
#endif
Expand Down

0 comments on commit bcef809

Please sign in to comment.