Implement platform specific keymap registration

This commit is contained in:
danieru 2013-04-20 13:01:15 -06:00
parent c2cf28e4b8
commit cbbed0f18b
2 changed files with 15 additions and 1 deletions

View File

@ -282,4 +282,17 @@ static int KeyMap::SetKeyMapping(KeyMap::Key key, int btn)
g_Config.iMappingMap[key] = btn;
}
// TODO: implement RegisterPlatformDefaultKeyMap()
static int KeyMap::RegisterPlatformDefaultKeyMap(std::map<int,int> *overriding_map)
{
if (overriding_map == NULL)
return 1;
platform_keymap = overriding_map;
return 0;
}
static void KeyMap::DeregisterPlatformDefaultKeyMap(void)
{
platform_keymap = NULL;
return;
}

View File

@ -185,5 +185,6 @@ namespace KeyMap {
* Any buttons missing will
* fallback to KeyMap's keymap. */
static int RegisterPlatformDefaultKeyMap(std::map<int,int> *);
static void DeregisterPlatformDefaultKeyMap(void);
}