lowercasing filenames, part1; makefile adjustments
[picodrive.git] / platform / common / config.c
index f8fe5d0..2704aca 100644 (file)
@@ -6,7 +6,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#ifdef UIQ3
+#ifdef __EPOC32__
 #include <unistd.h>
 #endif
 #include "config.h"
@@ -18,7 +18,7 @@ static char *mystrip(char *str);
 
 #include "menu.h"
 #include "emu.h"
-#include <Pico/Pico.h>
+#include <pico/pico.h>
 
 extern menu_entry opt_entries[];
 extern menu_entry opt2_entries[];
@@ -729,7 +729,8 @@ static void keys_parse(const char *var, const char *val, int binds[32],
                return;
        }
 
-       if (binds == currentConfig.KeyBinds && !(keys_encountered & (1<<t))) { // hack
+       // unbind old, but only when key is first encountered
+       if (t < 32 && binds == currentConfig.KeyBinds && !(keys_encountered & (1<<t))) {
                binds[t] = 0;
                keys_encountered |= 1<<t;
        }