aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/PalmOS/Src/palmevt.cpp32
-rw-r--r--backends/dc/input.cpp8
-rw-r--r--backends/gp32/gp32.cpp10
-rw-r--r--backends/midi/mt32.cpp2
-rw-r--r--backends/morphos/morphos.cpp20
-rw-r--r--backends/sdl/events.cpp62
-rw-r--r--backends/wince/wince-sdl.cpp18
-rw-r--r--backends/x11/x11.cpp18
8 files changed, 85 insertions, 85 deletions
diff --git a/backends/PalmOS/Src/palmevt.cpp b/backends/PalmOS/Src/palmevt.cpp
index 48ec8ae81a..1fcbf123aa 100644
--- a/backends/PalmOS/Src/palmevt.cpp
+++ b/backends/PalmOS/Src/palmevt.cpp
@@ -56,7 +56,7 @@ void OSystem_PALMOS::SimulateArrowKeys(Event &event, Int8 iHoriz, Int8 iVert) {
y = (y < 0 ) ? 0 : y;
y = (y >= _screenHeight ) ? _screenHeight - 1 : y;
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
event.mouse.x = x;
event.mouse.y = y;
set_mouse_pos(x, y);
@@ -126,7 +126,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
Int8 sy = 0;
if (keyCurrentState & _keyMouse.bitButLeft) {
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
event.mouse.x = _mouseCurState.x;
event.mouse.y = _mouseCurState.y;
_lastKeyPressed = kLastKeyNone;
@@ -165,7 +165,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
// ESC key
case vchrLaunch:
_lastKeyPressed = kLastKeyNone;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = 27;
event.kbd.ascii = 27;
event.kbd.flags = 0;
@@ -176,7 +176,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
case vchrMenu:
case vchrThumbWheelBack: // Tapwave back button
_lastKeyPressed = kLastKeyNone;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = 319;
event.kbd.ascii = 319;
event.kbd.flags = 0;
@@ -185,7 +185,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
case vchrCalc:
if (_lastKeyPressed & kLastKeyCalc)
if ((getMillis() - _exit_delay) <= (EXITDELAY))
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
_exit_delay = getMillis();
_lastKeyPressed = kLastKeyCalc;
@@ -197,7 +197,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
#ifndef DISABLE_TAPWAVE
case vchrActionRight:
#endif
- event.event_code = EVENT_RBUTTONDOWN;
+ event.type = EVENT_RBUTTONDOWN;
event.mouse.x = _mouseCurState.x;
event.mouse.y = _mouseCurState.y;
_lastKeyPressed = kLastKeyNone;
@@ -213,11 +213,11 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
// wheel
case vchrJogUp:
- event.event_code = EVENT_WHEELUP;
+ event.type = EVENT_WHEELUP;
return true;
case vchrJogDown:
- event.event_code = EVENT_WHEELDOWN;
+ event.type = EVENT_WHEELDOWN;
return true;
@@ -260,7 +260,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
// ESC key
case vchrHard2:
_lastKeyPressed = kLastKeyNone;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = 27;
event.kbd.ascii = 27;
event.kbd.flags = 0;
@@ -269,7 +269,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
// F5 = menu
case vchrHard3:
_lastKeyPressed = kLastKeyNone;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = 319;
event.kbd.ascii = 319;
event.kbd.flags = 0;
@@ -321,7 +321,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
b = 0;
} else if ((keycode == 'z' && b == KBD_CTRL) || (b == KBD_ALT && keycode == 'x')) {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
} else if (keycode == 'n' && b == KBD_CTRL) {
@@ -344,7 +344,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
#endif
}
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = keycode;
event.kbd.ascii = keycode; //(keycode>='a' && keycode<='z' && (event.kbd.flags & KBD_SHIFT) ? keycode &~ 0x20 : keycode);
event.kbd.flags = b;
@@ -367,7 +367,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
return true;
_lastEvent = penMoveEvent;
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
event.mouse.x = x;
event.mouse.y = y;
set_mouse_pos(event.mouse.x, event.mouse.y);
@@ -387,7 +387,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
_lastEvent = keyDownEvent;
_lastKeyPressed = kLastKeyNone;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = key;
event.kbd.ascii = key;
event.kbd.flags = 0;
@@ -399,7 +399,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
if (y > _screenHeight || y < 0 || x > _screenWidth || x < 0)
return true;
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
event.mouse.x = x;
event.mouse.y = y;
set_mouse_pos(event.mouse.x, event.mouse.y);
@@ -407,7 +407,7 @@ bool OSystem_PALMOS::pollEvent(Event &event) {
case penUpEvent:
getCoordinates(&ev, &x, &y);
- event.event_code = EVENT_LBUTTONUP;
+ event.type = EVENT_LBUTTONUP;
if (y > _screenHeight || y < 0 || x > _screenWidth || x < 0)
return true;
diff --git a/backends/dc/input.cpp b/backends/dc/input.cpp
index a202411f51..5de5115b1f 100644
--- a/backends/dc/input.cpp
+++ b/backends/dc/input.cpp
@@ -203,13 +203,13 @@ bool OSystem_Dreamcast::pollEvent(Event &event)
}
event.kbd.ascii = event.kbd.keycode = 0;
if(e<0) {
- event.event_code = (EventCode)-e;
+ event.type = (EventType)-e;
return true;
} else if(e>0) {
bool processed = false, down = !(e&(1<<30));
e &= ~(1<<30);
if(e < 1000) {
- event.event_code = (down? EVENT_KEYDOWN : EVENT_KEYUP);
+ event.type = (down? EVENT_KEYDOWN : EVENT_KEYUP);
event.kbd.keycode = e;
event.kbd.ascii = (e>='a' && e<='z' && (event.kbd.flags & KBD_SHIFT)?
e &~ 0x20 : e);
@@ -221,12 +221,12 @@ bool OSystem_Dreamcast::pollEvent(Event &event)
}
return processed;
} else if(_ms_cur_x != _ms_old_x || _ms_cur_y != _ms_old_y) {
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
_ms_old_x = _ms_cur_x;
_ms_old_y = _ms_cur_y;
return true;
} else {
- event.event_code = (EventCode)0;
+ event.type = (EventType)0;
return false;
}
}
diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp
index b7b6770ad1..844ec5ace6 100644
--- a/backends/gp32/gp32.cpp
+++ b/backends/gp32/gp32.cpp
@@ -842,7 +842,7 @@ bool OSystem_GP32::pollEvent(Event &event) { // fixme: make more user-friendly
if (key == GPC_VK_NONE) {
if (lastevent==EVENT_LBUTTONDOWN) {
lastevent=0;
- event.event_code = EVENT_LBUTTONUP;
+ event.type = EVENT_LBUTTONUP;
return true;
}
return false;
@@ -855,7 +855,7 @@ bool OSystem_GP32::pollEvent(Event &event) { // fixme: make more user-friendly
oldkey=key;
eventcount=EVENT_COUNT;
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
if (key & GPC_VK_FL && key & GPC_VK_FR) { // L+R = save state
printf("Saving game, please wait...");
@@ -903,12 +903,12 @@ bool OSystem_GP32::pollEvent(Event &event) { // fixme: make more user-friendly
if (key & GPC_VK_FA) {
lastevent=EVENT_LBUTTONDOWN;
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
return true;
}
if (key & GPC_VK_FB) {
lastevent=EVENT_RBUTTONDOWN;
- event.event_code = EVENT_RBUTTONDOWN;
+ event.type = EVENT_RBUTTONDOWN;
return true;
}
@@ -932,7 +932,7 @@ bool OSystem_GP32::pollEvent(Event &event) { // fixme: make more user-friendly
if (my>199) my=199;
}
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
km.x = event.mouse.x = mx;
km.y = event.mouse.y = my;
diff --git a/backends/midi/mt32.cpp b/backends/midi/mt32.cpp
index 5ca857529c..8bf3807603 100644
--- a/backends/midi/mt32.cpp
+++ b/backends/midi/mt32.cpp
@@ -113,7 +113,7 @@ public:
static int eatSystemEvents() {
OSystem::Event event;
while (g_system->pollEvent(event)) {
- switch (event.event_code) {
+ switch (event.type) {
case OSystem::EVENT_QUIT:
return 1;
default:
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp
index 1b4e16be5a..5092ead8a7 100644
--- a/backends/morphos/morphos.cpp
+++ b/backends/morphos/morphos.cpp
@@ -825,7 +825,7 @@ bool OSystem_MorphOS::pollEvent(Event &event)
qual |= KBD_CTRL;
event.kbd.flags = qual;
- event.event_code = (ScummMsg->Code & IECODE_UP_PREFIX) ? EVENT_KEYUP : EVENT_KEYDOWN;
+ event.type = (ScummMsg->Code & IECODE_UP_PREFIX) ? EVENT_KEYUP : EVENT_KEYDOWN;
ScummMsg->Code &= ~IECODE_UP_PREFIX;
if (ScummMsg->Code >= RAWKEY_F1 && ScummMsg->Code <= RAWKEY_F10)
@@ -849,13 +849,13 @@ bool OSystem_MorphOS::pollEvent(Event &event)
/*
* Wheelmouse event
*/
- event.event_code = (ScummMsg->Code == NM_WHEEL_UP) ? EVENT_WHEELUP : EVENT_WHEELDOWN;
+ event.type = (ScummMsg->Code == NM_WHEEL_UP) ? EVENT_WHEELUP : EVENT_WHEELDOWN;
}
else if (MapRawKey(&FakedIEvent, &charbuf, 1, NULL) == 1)
{
if (qual == KBD_CTRL && charbuf == 'z')
{
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
break;
}
else if (qual == KBD_ALT)
@@ -870,7 +870,7 @@ bool OSystem_MorphOS::pollEvent(Event &event)
}
else if (charbuf == 'x')
{
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
break;
}
else if (charbuf == 0x0d)
@@ -915,7 +915,7 @@ bool OSystem_MorphOS::pollEvent(Event &event)
else if (FullScreenMode)
newy = newy <? (ScummScrHeight >> ScummScale)-2;
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
event.mouse.x = newx;
event.mouse.y = newy;
set_mouse_pos(event.mouse.x, event.mouse.y);
@@ -932,19 +932,19 @@ bool OSystem_MorphOS::pollEvent(Event &event)
switch (ScummMsg->Code)
{
case SELECTDOWN:
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
break;
case SELECTUP:
- event.event_code = EVENT_LBUTTONUP;
+ event.type = EVENT_LBUTTONUP;
break;
case MENUDOWN:
- event.event_code = EVENT_RBUTTONDOWN;
+ event.type = EVENT_RBUTTONDOWN;
break;
case MENUUP:
- event.event_code = EVENT_RBUTTONUP;
+ event.type = EVENT_RBUTTONUP;
break;
default:
@@ -957,7 +957,7 @@ bool OSystem_MorphOS::pollEvent(Event &event)
}
case IDCMP_CLOSEWINDOW:
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
break;
}
diff --git a/backends/sdl/events.cpp b/backends/sdl/events.cpp
index 64da7fb9d4..ca223f51b3 100644
--- a/backends/sdl/events.cpp
+++ b/backends/sdl/events.cpp
@@ -155,7 +155,7 @@ bool OSystem_SDL::pollEvent(Event &event) {
// If the screen mode changed, send an EVENT_SCREEN_CHANGED
if (_modeChanged) {
_modeChanged = false;
- event.event_code = EVENT_SCREEN_CHANGED;
+ event.type = EVENT_SCREEN_CHANGED;
return true;
}
@@ -222,19 +222,19 @@ bool OSystem_SDL::pollEvent(Event &event) {
#ifdef MACOSX
// On Macintosh', Cmd-Q quits
if ((ev.key.keysym.mod & KMOD_META) && ev.key.keysym.sym == 'q') {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
#elif defined(UNIX)
// On other unices, Control-Q quits
if ((ev.key.keysym.mod & KMOD_CTRL) && ev.key.keysym.sym == 'q') {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
#else
// Ctrl-z and Alt-X quit
if ((b == KBD_CTRL && ev.key.keysym.sym == 'z') || (b == KBD_ALT && ev.key.keysym.sym == 'x')) {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
#endif
@@ -322,26 +322,26 @@ bool OSystem_SDL::pollEvent(Event &event) {
#ifdef LINUPY
// On Yopy map the End button to quit
if ((ev.key.keysym.sym == 293)) {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
// Map menu key to f5 (scumm menu)
if (ev.key.keysym.sym == 306) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_F5;
event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
return true;
}
// Map action key to action
if (ev.key.keysym.sym == 291) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_TAB;
event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
return true;
}
// Map OK key to skip cinematic
if (ev.key.keysym.sym == 292) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_ESCAPE;
event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
return true;
@@ -351,13 +351,13 @@ bool OSystem_SDL::pollEvent(Event &event) {
#ifdef QTOPIA
// quit on fn+backspace on zaurus
if (ev.key.keysym.sym == 127) {
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
// map menu key (f11) to f5 (scumm menu)
if (ev.key.keysym.sym == SDLK_F11) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_F5;
event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
}
@@ -365,25 +365,25 @@ bool OSystem_SDL::pollEvent(Event &event) {
// I wanted to map the calendar button but the calendar comes up
//
else if (ev.key.keysym.sym == SDLK_SPACE) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_TAB;
event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
}
// since we stole space (pause) above we'll rebind it to the tab key on the keyboard
else if (ev.key.keysym.sym == SDLK_TAB) {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = SDLK_SPACE;
event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
} else {
// let the events fall through if we didn't change them, this may not be the best way to
// set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
// and yes i have an huge terminal size so i dont wrap soon enough.
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
}
#else
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
event.kbd.keycode = ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
#endif
@@ -412,7 +412,7 @@ bool OSystem_SDL::pollEvent(Event &event) {
return true;
case SDL_KEYUP:
- event.event_code = EVENT_KEYUP;
+ event.type = EVENT_KEYUP;
event.kbd.keycode = ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
@@ -447,7 +447,7 @@ bool OSystem_SDL::pollEvent(Event &event) {
return true;
case SDL_MOUSEMOTION:
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
fillMouseEvent(event, ev.motion.x, ev.motion.y);
setMousePos(event.mouse.x, event.mouse.y);
@@ -455,14 +455,14 @@ bool OSystem_SDL::pollEvent(Event &event) {
case SDL_MOUSEBUTTONDOWN:
if (ev.button.button == SDL_BUTTON_LEFT)
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- event.event_code = EVENT_RBUTTONDOWN;
+ event.type = EVENT_RBUTTONDOWN;
#if defined(SDL_BUTTON_WHEELUP) && defined(SDL_BUTTON_WHEELDOWN)
else if (ev.button.button == SDL_BUTTON_WHEELUP)
- event.event_code = EVENT_WHEELUP;
+ event.type = EVENT_WHEELUP;
else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
- event.event_code = EVENT_WHEELDOWN;
+ event.type = EVENT_WHEELDOWN;
#endif
else
break;
@@ -473,9 +473,9 @@ bool OSystem_SDL::pollEvent(Event &event) {
case SDL_MOUSEBUTTONUP:
if (ev.button.button == SDL_BUTTON_LEFT)
- event.event_code = EVENT_LBUTTONUP;
+ event.type = EVENT_LBUTTONUP;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- event.event_code = EVENT_RBUTTONUP;
+ event.type = EVENT_RBUTTONUP;
else
break;
fillMouseEvent(event, ev.button.x, ev.button.y);
@@ -484,11 +484,11 @@ bool OSystem_SDL::pollEvent(Event &event) {
case SDL_JOYBUTTONDOWN:
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
- event.event_code = EVENT_LBUTTONDOWN;
+ event.type = EVENT_LBUTTONDOWN;
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
- event.event_code = EVENT_RBUTTONDOWN;
+ event.type = EVENT_RBUTTONDOWN;
} else {
- event.event_code = EVENT_KEYDOWN;
+ event.type = EVENT_KEYDOWN;
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
event.kbd.keycode = SDLK_ESCAPE;
@@ -512,11 +512,11 @@ bool OSystem_SDL::pollEvent(Event &event) {
case SDL_JOYBUTTONUP:
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
- event.event_code = EVENT_LBUTTONUP;
+ event.type = EVENT_LBUTTONUP;
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
- event.event_code = EVENT_RBUTTONUP;
+ event.type = EVENT_RBUTTONUP;
} else {
- event.event_code = EVENT_KEYUP;
+ event.type = EVENT_KEYUP;
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
event.kbd.keycode = SDLK_ESCAPE;
@@ -542,10 +542,10 @@ bool OSystem_SDL::pollEvent(Event &event) {
axis = ev.jaxis.value;
if ( axis > JOY_DEADZONE) {
axis -= JOY_DEADZONE;
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
} else if ( axis < -JOY_DEADZONE ) {
axis += JOY_DEADZONE;
- event.event_code = EVENT_MOUSEMOVE;
+ event.type = EVENT_MOUSEMOVE;
} else
axis = 0;
@@ -590,7 +590,7 @@ bool OSystem_SDL::pollEvent(Event &event) {
break;
case SDL_QUIT:
- event.event_code = EVENT_QUIT;
+ event.type = EVENT_QUIT;
return true;
}
}
diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp
index b6fa512773..c159a38a42 100644
--- a/backends/wince/wince-sdl.cpp
+++ b/backends/wince/wince-sdl.cpp
@@ -1303,7 +1303,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
// If the screen mode changed, send an EVENT_SCREEN_CHANGED
if (_modeChanged) {
_modeChanged = false;
- event->event_code = EVENT_SCREEN_CHANGED;
+ event->type = EVENT_SCREEN_CHANGED;
return true;
}
@@ -1313,7 +1313,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
if (CEActions::Instance()->performMapped(ev.key.keysym.sym, true))
return true;
- event->event_code = EVENT_KEYDOWN;
+ event->type = EVENT_KEYDOWN;
event->kbd.keycode = ev.key.keysym.sym;
event->kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
@@ -1326,7 +1326,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
if (CEActions::Instance()->performMapped(ev.key.keysym.sym, false))
return true;
- event->event_code = EVENT_KEYUP;
+ event->type = EVENT_KEYUP;
event->kbd.keycode = ev.key.keysym.sym;
event->kbd.ascii = mapKeyCE(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
@@ -1336,16 +1336,16 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
return true;
case SDL_MOUSEMOTION:
- event->event_code = EVENT_MOUSEMOVE;
+ event->type = EVENT_MOUSEMOVE;
fillMouseEvent(*event, ev.motion.x, ev.motion.y);
set_mouse_pos(event->mouse.x, event->mouse.y);
return true;
case SDL_MOUSEBUTTONDOWN:
if (ev.button.button == SDL_BUTTON_LEFT)
- temp_event.event_code = EVENT_LBUTTONDOWN;
+ temp_event.type = EVENT_LBUTTONDOWN;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- temp_event.event_code = EVENT_RBUTTONDOWN;
+ temp_event.type = EVENT_RBUTTONDOWN;
else
break;
@@ -1371,9 +1371,9 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
case SDL_MOUSEBUTTONUP:
if (ev.button.button == SDL_BUTTON_LEFT)
- temp_event.event_code = EVENT_LBUTTONUP;
+ temp_event.type = EVENT_LBUTTONUP;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- temp_event.event_code = EVENT_RBUTTONUP;
+ temp_event.type = EVENT_RBUTTONUP;
else
break;
@@ -1395,7 +1395,7 @@ bool OSystem_WINCE3::pollEvent(Event &event) {
break;
case SDL_QUIT:
- event->event_code = EVENT_QUIT;
+ event->type = EVENT_QUIT;
return true;
}
}
diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp
index 2fa8398e29..cdb34dcaf3 100644
--- a/backends/x11/x11.cpp
+++ b/backends/x11/x11.cpp
@@ -923,7 +923,7 @@ bool OSystem_X11::pollEvent(Event &scumm_event) {
}
}
if (keycode != -1) {
- scumm_event.event_code = EVENT_KEYDOWN;
+ scumm_event.type = EVENT_KEYDOWN;
scumm_event.kbd.keycode = keycode;
scumm_event.kbd.ascii = (ascii != -1 ? ascii : keycode);
scumm_event.kbd.flags = mode;
@@ -965,7 +965,7 @@ bool OSystem_X11::pollEvent(Event &scumm_event) {
}
}
if (keycode != -1) {
- scumm_event.event_code = EVENT_KEYUP;
+ scumm_event.type = EVENT_KEYUP;
scumm_event.kbd.keycode = keycode;
scumm_event.kbd.ascii = (ascii != -1 ? ascii : keycode);
scumm_event.kbd.flags = mode;
@@ -978,12 +978,12 @@ bool OSystem_X11::pollEvent(Event &scumm_event) {
if (report_presses != 0) {
if (event.xbutton.button == 1) {
if (fake_right_mouse == 0) {
- scumm_event.event_code = EVENT_LBUTTONDOWN;
+ scumm_event.type = EVENT_LBUTTONDOWN;
} else {
- scumm_event.event_code = EVENT_RBUTTONDOWN;
+ scumm_event.type = EVENT_RBUTTONDOWN;
}
} else if (event.xbutton.button == 3)
- scumm_event.event_code = EVENT_RBUTTONDOWN;
+ scumm_event.type = EVENT_RBUTTONDOWN;
scumm_event.mouse.x = event.xbutton.x - scumm_x;
scumm_event.mouse.y = event.xbutton.y - scumm_y;
return true;
@@ -994,12 +994,12 @@ bool OSystem_X11::pollEvent(Event &scumm_event) {
if (report_presses != 0) {
if (event.xbutton.button == 1) {
if (fake_right_mouse == 0) {
- scumm_event.event_code = EVENT_LBUTTONUP;
+ scumm_event.type = EVENT_LBUTTONUP;
} else {
- scumm_event.event_code = EVENT_RBUTTONUP;
+ scumm_event.type = EVENT_RBUTTONUP;
}
} else if (event.xbutton.button == 3)
- scumm_event.event_code = EVENT_RBUTTONUP;
+ scumm_event.type = EVENT_RBUTTONUP;
scumm_event.mouse.x = event.xbutton.x - scumm_x;
scumm_event.mouse.y = event.xbutton.y - scumm_y;
return true;
@@ -1007,7 +1007,7 @@ bool OSystem_X11::pollEvent(Event &scumm_event) {
break;
case MotionNotify:
- scumm_event.event_code = EVENT_MOUSEMOVE;
+ scumm_event.type = EVENT_MOUSEMOVE;
scumm_event.mouse.x = event.xmotion.x - scumm_x;
scumm_event.mouse.y = event.xmotion.y - scumm_y;
set_mouse_pos(scumm_event.mouse.x, scumm_event.mouse.y);