diff --git a/config.def.h b/config.def.h index b36943c499..13178a5d7c 100644 --- a/config.def.h +++ b/config.def.h @@ -381,6 +381,58 @@ static const bool input_debug_enable = false; static const bool input_autodetect_enable = true; #endif +#ifdef __CELLOS_LV2__ +#define RETRO_DEF_JOYPAD_B (1ULL << RETRO_DEVICE_ID_JOYPAD_B) +#define RETRO_DEF_JOYPAD_Y (1ULL << RETRO_DEVICE_ID_JOYPAD_Y) +#define RETRO_DEF_JOYPAD_SELECT (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT) +#define RETRO_DEF_JOYPAD_START (1ULL << RETRO_DEVICE_ID_JOYPAD_START) +#define RETRO_DEF_JOYPAD_UP (1ULL << RETRO_DEVICE_ID_JOYPAD_UP) +#define RETRO_DEF_JOYPAD_DOWN (1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) +#define RETRO_DEF_JOYPAD_LEFT (1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) +#define RETRO_DEF_JOYPAD_RIGHT (1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) +#define RETRO_DEF_JOYPAD_A (1ULL << RETRO_DEVICE_ID_JOYPAD_A) +#define RETRO_DEF_JOYPAD_X (1ULL << RETRO_DEVICE_ID_JOYPAD_X) +#define RETRO_DEF_JOYPAD_L (1ULL << RETRO_DEVICE_ID_JOYPAD_L) +#define RETRO_DEF_JOYPAD_R (1ULL << RETRO_DEVICE_ID_JOYPAD_R) +#define RETRO_DEF_JOYPAD_L2 (1ULL << RETRO_DEVICE_ID_JOYPAD_L2) +#define RETRO_DEF_JOYPAD_R2 (1ULL << RETRO_DEVICE_ID_JOYPAD_R2) +#define RETRO_DEF_JOYPAD_L3 (1ULL << RETRO_DEVICE_ID_JOYPAD_L3) +#define RETRO_DEF_JOYPAD_R3 (1ULL << RETRO_DEVICE_ID_JOYPAD_R3) +#define RETRO_DEF_ANALOGL_DPAD_LEFT ((1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) | (1ULL << RARCH_ANALOG_LEFT_X_DPAD_LEFT)) +#define RETRO_DEF_ANALOGL_DPAD_RIGHT ((1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) | (1ULL << RARCH_ANALOG_LEFT_X_DPAD_RIGHT)) +#define RETRO_DEF_ANALOGL_DPAD_UP ((1ULL << RETRO_DEVICE_ID_JOYPAD_UP) | (1ULL << RARCH_ANALOG_LEFT_Y_DPAD_UP)) +#define RETRO_DEF_ANALOGL_DPAD_DOWN ((1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) | (1ULL << RARCH_ANALOG_LEFT_Y_DPAD_DOWN)) +#define RETRO_DEF_ANALOGR_DPAD_LEFT ((1ULL << RETRO_DEVICE_ID_JOYPAD_LEFT) | (1ULL << RARCH_ANALOG_RIGHT_X_DPAD_LEFT)) +#define RETRO_DEF_ANALOGR_DPAD_RIGHT ((1ULL << RETRO_DEVICE_ID_JOYPAD_RIGHT) | (1ULL << RARCH_ANALOG_RIGHT_X_DPAD_RIGHT)) +#define RETRO_DEF_ANALOGR_DPAD_UP ((1ULL << RETRO_DEVICE_ID_JOYPAD_UP) | (1ULL << RARCH_ANALOG_RIGHT_Y_DPAD_UP)) +#define RETRO_DEF_ANALOGR_DPAD_DOWN ((1ULL << RETRO_DEVICE_ID_JOYPAD_DOWN) | (1ULL << RARCH_ANALOG_RIGHT_Y_DPAD_DOWN)) +#else +#define RETRO_DEF_JOYPAD_B NO_BTN +#define RETRO_DEF_JOYPAD_Y NO_BTN +#define RETRO_DEF_JOYPAD_SELECT NO_BTN +#define RETRO_DEF_JOYPAD_START NO_BTN +#define RETRO_DEF_JOYPAD_UP NO_BTN +#define RETRO_DEF_JOYPAD_DOWN NO_BTN +#define RETRO_DEF_JOYPAD_LEFT NO_BTN +#define RETRO_DEF_JOYPAD_RIGHT NO_BTN +#define RETRO_DEF_JOYPAD_A NO_BTN +#define RETRO_DEF_JOYPAD_X NO_BTN +#define RETRO_DEF_JOYPAD_L NO_BTN +#define RETRO_DEF_JOYPAD_R NO_BTN +#define RETRO_DEF_JOYPAD_L2 NO_BTN +#define RETRO_DEF_JOYPAD_R2 NO_BTN +#define RETRO_DEF_JOYPAD_L3 NO_BTN +#define RETRO_DEF_JOYPAD_R3 NO_BTN +#define RETRO_DEF_ANALOGL_DPAD_LEFT NO_BTN +#define RETRO_DEF_ANALOGL_DPAD_RIGHT NO_BTN +#define RETRO_DEF_ANALOGL_DPAD_UP NO_BTN +#define RETRO_DEF_ANALOGL_DPAD_DOWN NO_BTN +#define RETRO_DEF_ANALOGR_DPAD_LEFT NO_BTN +#define RETRO_DEF_ANALOGR_DPAD_RIGHT NO_BTN +#define RETRO_DEF_ANALOGR_DPAD_UP NO_BTN +#define RETRO_DEF_ANALOGR_DPAD_DOWN NO_BTN +#endif + #define RETRO_LBL_JOYPAD_B "RetroPad B Button" #define RETRO_LBL_JOYPAD_Y "RetroPad Y Button" #define RETRO_LBL_JOYPAD_SELECT "RetroPad Select Button" @@ -445,22 +497,22 @@ static const bool input_autodetect_enable = true; // Player 1 static const struct retro_keybind retro_keybinds_1[] = { // | RetroPad button | desc | keyboard key | js btn | js axis | - { true, RETRO_DEVICE_ID_JOYPAD_B, RETRO_LBL_JOYPAD_B, RETROK_z, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_Y, RETRO_LBL_JOYPAD_Y, RETROK_a, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_SELECT, RETRO_LBL_JOYPAD_SELECT, RETROK_RSHIFT, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_START, RETRO_LBL_JOYPAD_START, RETROK_RETURN, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_UP, RETRO_LBL_JOYPAD_UP, RETROK_UP, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_DOWN, RETRO_LBL_JOYPAD_DOWN, RETROK_DOWN, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_LEFT, RETRO_LBL_JOYPAD_LEFT, RETROK_LEFT, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_RIGHT, RETRO_LBL_JOYPAD_RIGHT, RETROK_RIGHT, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_A, RETRO_LBL_JOYPAD_A, RETROK_x, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_X, RETRO_LBL_JOYPAD_X, RETROK_s, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_L, RETRO_LBL_JOYPAD_L, RETROK_q, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_R, RETRO_LBL_JOYPAD_R, RETROK_w, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_L2, RETRO_LBL_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_R2, RETRO_LBL_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_L3, RETRO_LBL_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RETRO_DEVICE_ID_JOYPAD_R3, RETRO_LBL_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_B, RETRO_LBL_JOYPAD_B, RETROK_z, RETRO_DEF_JOYPAD_B, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_Y, RETRO_LBL_JOYPAD_Y, RETROK_a, RETRO_DEF_JOYPAD_Y, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_SELECT, RETRO_LBL_JOYPAD_SELECT, RETROK_RSHIFT, RETRO_DEF_JOYPAD_SELECT, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_START, RETRO_LBL_JOYPAD_START, RETROK_RETURN, RETRO_DEF_JOYPAD_START, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_UP, RETRO_LBL_JOYPAD_UP, RETROK_UP, RETRO_DEF_JOYPAD_UP, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_DOWN, RETRO_LBL_JOYPAD_DOWN, RETROK_DOWN, RETRO_DEF_JOYPAD_DOWN, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_LEFT, RETRO_LBL_JOYPAD_LEFT, RETROK_LEFT, RETRO_DEF_JOYPAD_LEFT, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_RIGHT, RETRO_LBL_JOYPAD_RIGHT, RETROK_RIGHT, RETRO_DEF_JOYPAD_RIGHT, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_A, RETRO_LBL_JOYPAD_A, RETROK_x, RETRO_DEF_JOYPAD_A, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_X, RETRO_LBL_JOYPAD_X, RETROK_s, RETRO_DEF_JOYPAD_X, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_L, RETRO_LBL_JOYPAD_L, RETROK_q, RETRO_DEF_JOYPAD_L, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_R, RETRO_LBL_JOYPAD_R, RETROK_w, RETRO_DEF_JOYPAD_R, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_L2, RETRO_LBL_JOYPAD_L2, RETROK_UNKNOWN, RETRO_DEF_JOYPAD_L2, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_R2, RETRO_LBL_JOYPAD_R2, RETROK_UNKNOWN, RETRO_DEF_JOYPAD_R2, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_L3, RETRO_LBL_JOYPAD_L3, RETROK_UNKNOWN, RETRO_DEF_JOYPAD_L3, AXIS_NONE }, + { true, RETRO_DEVICE_ID_JOYPAD_R3, RETRO_LBL_JOYPAD_R3, RETROK_UNKNOWN, RETRO_DEF_JOYPAD_R3, AXIS_NONE }, { true, RARCH_TURBO_ENABLE, RETRO_LBL_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, { true, RARCH_ANALOG_LEFT_X_PLUS, RETRO_LBL_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, @@ -472,14 +524,14 @@ static const struct retro_keybind retro_keybinds_1[] = { { true, RARCH_ANALOG_RIGHT_Y_PLUS, RETRO_LBL_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, { true, RARCH_ANALOG_RIGHT_Y_MINUS, RETRO_LBL_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, #ifdef RARCH_CONSOLE - { true, RARCH_ANALOG_LEFT_X_DPAD_LEFT, RETRO_LBL_ANALOG_LEFT_X_DPAD_L, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_LEFT_X_DPAD_RIGHT,RETRO_LBL_ANALOG_LEFT_X_DPAD_R, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_LEFT_Y_DPAD_UP, RETRO_LBL_ANALOG_LEFT_Y_DPAD_U, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_LEFT_Y_DPAD_DOWN, RETRO_LBL_ANALOG_LEFT_Y_DPAD_D, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_RIGHT_X_DPAD_LEFT,RETRO_LBL_ANALOG_RIGHT_X_DPAD_L, RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_RIGHT_X_DPAD_RIGHT,RETRO_LBL_ANALOG_RIGHT_X_DPAD_R,RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_RIGHT_Y_DPAD_UP, RETRO_LBL_ANALOG_RIGHT_Y_DPAD_U,RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, - { true, RARCH_ANALOG_RIGHT_Y_DPAD_DOWN, RETRO_LBL_ANALOG_RIGHT_Y_DPAD_D,RETROK_UNKNOWN, NO_BTN, AXIS_NONE }, + { true, RARCH_ANALOG_LEFT_X_DPAD_LEFT, RETRO_LBL_ANALOG_LEFT_X_DPAD_L, RETROK_UNKNOWN, RETRO_DEF_ANALOGL_DPAD_LEFT, AXIS_NONE }, + { true, RARCH_ANALOG_LEFT_X_DPAD_RIGHT,RETRO_LBL_ANALOG_LEFT_X_DPAD_R, RETROK_UNKNOWN, RETRO_DEF_ANALOGL_DPAD_RIGHT, AXIS_NONE }, + { true, RARCH_ANALOG_LEFT_Y_DPAD_UP, RETRO_LBL_ANALOG_LEFT_Y_DPAD_U, RETROK_UNKNOWN, RETRO_DEF_ANALOGL_DPAD_UP, AXIS_NONE }, + { true, RARCH_ANALOG_LEFT_Y_DPAD_DOWN, RETRO_LBL_ANALOG_LEFT_Y_DPAD_D, RETROK_UNKNOWN, RETRO_DEF_ANALOGL_DPAD_DOWN, AXIS_NONE }, + { true, RARCH_ANALOG_RIGHT_X_DPAD_LEFT,RETRO_LBL_ANALOG_RIGHT_X_DPAD_L, RETROK_UNKNOWN, RETRO_DEF_ANALOGR_DPAD_LEFT, AXIS_NONE }, + { true, RARCH_ANALOG_RIGHT_X_DPAD_RIGHT,RETRO_LBL_ANALOG_RIGHT_X_DPAD_R,RETROK_UNKNOWN, RETRO_DEF_ANALOGR_DPAD_RIGHT, AXIS_NONE }, + { true, RARCH_ANALOG_RIGHT_Y_DPAD_UP, RETRO_LBL_ANALOG_RIGHT_Y_DPAD_U,RETROK_UNKNOWN, RETRO_DEF_ANALOGR_DPAD_UP, AXIS_NONE }, + { true, RARCH_ANALOG_RIGHT_Y_DPAD_DOWN, RETRO_LBL_ANALOG_RIGHT_Y_DPAD_D,RETROK_UNKNOWN, RETRO_DEF_ANALOGR_DPAD_DOWN, AXIS_NONE }, #endif { true, RARCH_FAST_FORWARD_KEY, RETRO_LBL_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, AXIS_NONE },