[Scummvm-cvs-logs] scummvm master -> a3774072a3d6ee6aa2bba5f616d525d241c981e3
m-kiewitz
m_kiewitz at users.sourceforge.net
Mon Feb 1 02:09:48 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a3774072a3 SCI: Revert ascii detection for key event handling
Commit: a3774072a3d6ee6aa2bba5f616d525d241c981e3
https://github.com/scummvm/scummvm/commit/a3774072a3d6ee6aa2bba5f616d525d241c981e3
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-01T02:09:12+01:00
Commit Message:
SCI: Revert ascii detection for key event handling
Seems to cause at least issues on AmigaOS probably b/c SDL.
See bug #7009.
Added FIXME. Underlying issue needs to get fixed in SDL backend
or in SDL itself.
Changed paths:
engines/sci/event.cpp
diff --git a/engines/sci/event.cpp b/engines/sci/event.cpp
index 90ddaaf..e8744b8 100644
--- a/engines/sci/event.cpp
+++ b/engines/sci/event.cpp
@@ -214,6 +214,8 @@ SciEvent EventManager::getScummVMEvent() {
//((ev.kbd.flags & Common::KBD_CAPS) ? SCI_KEYMOD_CAPSLOCK : 0) |
//((ev.kbd.flags & Common::KBD_SCRL) ? SCI_KEYMOD_SCRLOCK : 0) |
+ // FIXME: this hack should also not be here, see below
+#if 0
if (input.data >= Common::KEYCODE_KP0 && input.data <= Common::KEYCODE_KP9) {
if (!(ev.kbd.flags & Common::KBD_NUM)) {
// HACK: Num-Lock not enabled
@@ -222,8 +224,15 @@ SciEvent EventManager::getScummVMEvent() {
input.character = 0;
}
}
-
- if ((input.character) && (input.character <= 0xFF)) {
+#endif
+
+ // FIXME: using .ascii (.character) in here somewhat works on Windows+Linux, but it seems that
+ // at least SDL on AmigaOS returns valid .ascii characters when Fx keys are pressed etc.
+ // Check bug #7009. For now I reverted my changes. This needs to get fixed properly in backend / SDL itself.
+ // On Windows .ascii field gets values, when Fx keys are pressed as well, but it's above 0xFF.
+ // On AmigaOS it seems to return a value <= 0xFF.
+ //if ((input.character) && (input.character <= 0xFF)) {
+ if (!(input.data & 0xFF00)) {
// Directly accept most common keys without conversion
if ((input.character >= 0x80) && (input.character <= 0xFF)) {
// If there is no extended font, we will just clear the
More information about the Scummvm-git-logs
mailing list