aboutsummaryrefslogtreecommitdiff
path: root/backends/morphos
diff options
context:
space:
mode:
authorRuediger Hanke2002-11-15 15:06:19 +0000
committerRuediger Hanke2002-11-15 15:06:19 +0000
commit6b1376335c0ecc3490d8dfeb1f1e749ee16e91e5 (patch)
treefdd91dd689b320e9789321cdae67250902b7301f /backends/morphos
parent8671a41ae671276fa6e23a5aa56047405d9b59e5 (diff)
downloadscummvm-rg350-6b1376335c0ecc3490d8dfeb1f1e749ee16e91e5.tar.gz
scummvm-rg350-6b1376335c0ecc3490d8dfeb1f1e749ee16e91e5.tar.bz2
scummvm-rg350-6b1376335c0ecc3490d8dfeb1f1e749ee16e91e5.zip
Mousewheel support added
svn-id: r5564
Diffstat (limited to 'backends/morphos')
-rw-r--r--backends/morphos/morphos.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp
index c27609d085..bbc5d93f22 100644
--- a/backends/morphos/morphos.cpp
+++ b/backends/morphos/morphos.cpp
@@ -30,6 +30,7 @@
#include <exec/libraries.h>
#include <exec/semaphores.h>
#include <devices/ahi.h>
+#include <devices/rawkeycodes.h>
#include <dos/dostags.h>
#include <intuition/screens.h>
#include <cybergraphics/cybergraphics.h>
@@ -67,7 +68,7 @@ static TagItem PlayTags[] = { { CDPA_StartTrack, 1 },
TagItem musicProcTags[] = { { NP_Entry, 0 },
{ NP_Name, (ULONG)"ScummVM Music Thread" },
- { NP_Priority, 0 },
+ { NP_Priority, 60 },
{ TAG_DONE, 0 }
};
TagItem soundProcTags[] = { { NP_Entry, 0 },
@@ -732,14 +733,29 @@ bool OSystem_MorphOS::poll_event(Event *event)
event->event_code = (ScummMsg->Code & IECODE_UP_PREFIX) ? EVENT_KEYUP : EVENT_KEYDOWN;
ScummMsg->Code &= ~IECODE_UP_PREFIX;
- if (ScummMsg->Code >= 0x50 && ScummMsg->Code <= 0x59)
+ if (ScummMsg->Code >= RAWKEY_F1 && ScummMsg->Code <= RAWKEY_F10)
{
/*
* Function key
*/
- event->kbd.ascii = (ScummMsg->Code-0x50)+315;
+ event->kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+315;
+ event->kbd.keycode = 0;
+ }
+ else if (ScummMsg->Code == RAWKEY_F11 || ScummMsg->Code == RAWKEY_F12)
+ {
+ /*
+ * Function key on PC keyboard
+ */
+ event->kbd.ascii = (ScummMsg->Code == RAWKEY_F11) ? 325 : 326;
event->kbd.keycode = 0;
}
+ else if (ScummMsg->Code == NM_WHEEL_UP || ScummMsg->Code == NM_WHEEL_DOWN)
+ {
+ /*
+ * Wheelmouse event
+ */
+ event->event_code = (ScummMsg->Code == NM_WHEEL_UP) ? EVENT_WHEELUP : EVENT_WHEELDOWN;
+ }
else if (MapRawKey(&FakedIEvent, &charbuf, 1, NULL) == 1)
{
if (qual == KBD_CTRL)