[Scummvm-cvs-logs] scummvm master -> d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203

bluegr md5 at scummvm.org
Fri Dec 30 00:16:24 CET 2011


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:
d55ce36268 KEYMAPPER: Use hasFlags() in findHardwareKey()


Commit: d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203
    https://github.com/scummvm/scummvm/commit/d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-29T15:15:06-08:00

Commit Message:
KEYMAPPER: Use hasFlags() in findHardwareKey()

Changed paths:
    backends/keymapper/hardware-key.h



diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index 014e73a..daa853d 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -97,12 +97,8 @@ public:
 		List<const HardwareKey*>::const_iterator it;
 
 		for (it = _keys.begin(); it != _keys.end(); it++) {
-			if ((*it)->key.keycode == keystate.keycode) {
-				// Only check for control/alt/shift modifiers, not for sticky
-				// modifiers like num lock/caps lock/scroll lock
-				if ((*it)->key.flags == (keystate.flags & 7))
-					return (*it);
-			}
+			if (keystate.keycode == (*it)->key.keycode && keystate.hasFlags((*it)->key.flags))
+				return (*it);
 		}
 		return 0;
 	}






More information about the Scummvm-git-logs mailing list