diff options
Diffstat (limited to 'backends/morphos/morphos.cpp')
-rw-r--r-- | backends/morphos/morphos.cpp | 22 |
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) |