+// This version is simpler since we don't need safeguards.
+static void loadPlayer2Keymap(GConfClient* gcc)
+{
+ // Build player 2 keyboard gconf key relative path
+ gchar key[kGConfPlayerPathBufferLen];
+ gchar *relKey = key + sprintf(key,
+ kGConfPlayerPath kGConfPlayerKeyboardPath "/", 2);
+
+ // Ignore config file key mappings
+ ZeroMemory(Config.joypad2Mapping, sizeof(Config.joypad2Mapping));
+
+ int i, scancode;
+ for (i = 0; buttons[i].gconf_key; i++) {
+ if (buttons[i].is_action) continue;
+
+ strcpy(relKey, buttons[i].gconf_key);
+ scancode = gconf_client_get_int(gcc, key, NULL);
+
+ // Ignore out of range values
+ if (scancode <= 0 || scancode > 255) continue;
+
+ Config.joypad2Mapping[scancode] |= buttons[i].mask;
+ }
+}
+