onepad: replace conf pointer by g_conf object

This commit is contained in:
Gregory Hainaut committed 2017-05-03 12:03:56 +02:00
1 parent db4f28f4ca
commit 7597b31215
12 files changed
+56 -62

No files matched your search

+3 -3
View File
@@ -24,15 +24,15 @@
__forceinline void set_keyboard_key(int pad, int keysym, int index)
{
conf->keysym_map[pad][keysym] = index;
g_conf.keysym_map[pad][keysym] = index;
}
__forceinline int get_keyboard_key(int pad, int keysym)
{
// You must use find instead of []
// [] will create an element if the key does not exist and return 0
map<u32, u32>::iterator it = conf->keysym_map[pad].find(keysym);
if (it != conf->keysym_map[pad].end())
map<u32, u32>::iterator it = g_conf.keysym_map[pad].find(keysym);
if (it != g_conf.keysym_map[pad].end())
return it->second;
else
return -1;