starting input layer integration work
[libpicofe.git] / gp2x / emu.c
index c696d88..a19329d 100644 (file)
@@ -22,6 +22,7 @@
 #include "../common/fonts.h"\r
 #include "../common/emu.h"\r
 #include "../common/config.h"\r
+#include "../common/input.h"\r
 #include "../linux/sndout_oss.h"\r
 #include "cpuctrl.h"\r
 \r
@@ -123,12 +124,8 @@ void emu_Deinit(void)
                SRam.changed = 0;\r
        }\r
 \r
-       if (!(currentConfig.EmuOpt & 0x20)) {\r
-               config_writelrom(PicoConfigFile);\r
-#ifndef NO_SYNC\r
-               sync();\r
-#endif\r
-       }\r
+       if (!(currentConfig.EmuOpt & EOPT_NO_AUTOSVCFG))\r
+               emu_writelrom();\r
 \r
        free(PicoDraw2FB);\r
 \r
@@ -584,6 +581,14 @@ static void updateKeys(void)
        keys &= CONFIGURABLE_KEYS;\r
        keys2 = keys;\r
 \r
+#if 1\r
+       {\r
+               /* FIXME: combos */\r
+               int acts = in_update();\r
+               int pl = (acts >> 16) & 1;\r
+               allActions[pl] |= acts;\r
+       }\r
+#else\r
        for (i = 0; i < 32; i++)\r
        {\r
                if (keys2 & (1 << i))\r
@@ -611,6 +616,7 @@ static void updateKeys(void)
                        }\r
                }\r
        }\r
+#endif\r
 \r
        // add joy inputs\r
        if (num_of_joys > 0)\r