/* This file contains lookup information on known controllers */ #include #include #include #include #include #include "joymapping.h" #include "menu.h" #include "input.h" #include "user_io.h" #define DPAD_COUNT 4 /*****************************************************************************/ int swap_face_buttons(const char *core_name) { //flags cores where B A should be swapped to A B and Y X to X Y (SNES vs. Genesis/NG) return (!strcmp(core_name, "Genesis") || !strcmp(core_name, "NEOGEO") || !strcmp(core_name, "SMS")); } int map_joystick(const char *core_name, devInput (&input)[NUMDEV], int dev) { /* attemps to centrally defined core joy mapping to the joystick declaredy by a core config string we use the names declared by core with some special handling for specific edge cases Input button order is "virtual SNES" i.e.: A, B, X, Y, L, R, Select, Start */ uint32_t new_map[NUMBUTTONS]; // first copy directions (not really needed but helps keep things consistent) for(int i=0; i