[Scummvm-cvs-logs] scummvm master -> 410c9e0b30ae3f140bd55cfcfa05308d929da24e
bluegr
md5 at scummvm.org
Thu Dec 29 23:10:29 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5c9da28119 CREATE_PROJECT: Add support for enabling the key mapper feature
410c9e0b30 KEYMAPPER: Fix broken implementation of findHardwareKey()
Commit: 5c9da2811964245c7bd26840a4710ff78ddaf334
https://github.com/scummvm/scummvm/commit/5c9da2811964245c7bd26840a4710ff78ddaf334
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-29T14:09:10-08:00
Commit Message:
CREATE_PROJECT: Add support for enabling the key mapper feature
Changed paths:
devtools/create_project/create_project.cpp
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 775e67c..15830bd 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -855,6 +855,7 @@ const Feature s_features[] = {
{ "taskbar", "USE_TASKBAR", "", true, "Taskbar integration support" },
{ "translation", "USE_TRANSLATION", "", true, "Translation support" },
{ "vkeybd", "ENABLE_VKEYBD", "", false, "Virtual keyboard support"},
+ { "keymapper","ENABLE_KEYMAPPER", "", false, "Keymapper support"},
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" } // This feature actually depends on "translation", there
// is just no current way of properly detecting this...
};
Commit: 410c9e0b30ae3f140bd55cfcfa05308d929da24e
https://github.com/scummvm/scummvm/commit/410c9e0b30ae3f140bd55cfcfa05308d929da24e
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-29T14:09:10-08:00
Commit Message:
KEYMAPPER: Fix broken implementation of findHardwareKey()
This fixes the keymapper dialog (at least on desktop platforms), but the
keymapper itself is still not working (tested with LoL)
Changed paths:
backends/keymapper/hardware-key.h
backends/keymapper/keymap.cpp
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index 32df042..014e73a 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -97,8 +97,12 @@ public:
List<const HardwareKey*>::const_iterator it;
for (it = _keys.begin(); it != _keys.end(); it++) {
- if ((*it)->key == keystate)
- return (*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);
+ }
}
return 0;
}
diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index d2c9b9b..d64b888 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -145,7 +145,7 @@ void Keymap::loadMappings(const HardwareKeySet *hwKeys) {
const HardwareKey *hwKey = hwKeys->findHardwareKey(it->_value.c_str());
if (!hwKey) {
- warning("HardwareKey with ID %s not known", it->_value.c_str());
+ warning("HardwareKey with ID '%s' not known", it->_value.c_str());
_configDomain->erase(key);
continue;
}
@@ -199,7 +199,7 @@ bool Keymap::isComplete(const HardwareKeySet *hwKeys) {
// - if an action finds a key with required type but a parent action with
// higher priority is using it, that key is never used
void Keymap::automaticMapping(HardwareKeySet *hwKeys) {
-#if 0 //disabling the broken automapper for now
+#if 1 //disabling the broken automapper for now
// Create copies of action and key lists.
List<Action*> actions(_actions);
List<const HardwareKey*> keys(hwKeys->getHardwareKeys());
More information about the Scummvm-git-logs
mailing list