Skip to content

Commit

Permalink
Merge pull request #130 from revvv/fire3
Browse files Browse the repository at this point in the history
cap32: add joystick button fire3
  • Loading branch information
DSkywalk committed Apr 15, 2023
2 parents 22d0475 + b7cffce commit 7ba8a88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cap32/kbdauto.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ typedef enum {
CPC_J0_RIGHT,
CPC_J0_FIRE1,
CPC_J0_FIRE2,
CPC_J0_FIRE3,
CPC_J1_UP,
CPC_J1_DOWN,
CPC_J1_LEFT,
CPC_J1_RIGHT,
CPC_J1_FIRE1,
CPC_J1_FIRE2,
CPC_J1_FIRE3,
CPC_ES_NTILDE,
CPC_ES_nTILDE,
CPC_ES_PESETA,
Expand Down Expand Up @@ -460,12 +462,14 @@ int kbd_layout[KBD_MAX_ENTRIES][2] = {
0x93, // CPC_J0_RIGHT
0x94, // CPC_J0_FIRE1
0x95, // CPC_J0_FIRE2
0x96, // CPC_J0_FIRE3
0x60, // CPC_J1_UP
0x61, // CPC_J1_DOWN
0x62, // CPC_J1_LEFT
0x63, // CPC_J1_RIGHT
0x64, // CPC_J1_FIRE1
0x65, // CPC_J1_FIRE2
0x66, // CPC_J1_FIRE3
0xff, // CPC_ES_NTILDE
0xff, // CPC_ES_nTILDE
0xff, // CPC_ES_PESETA
Expand Down
2 changes: 1 addition & 1 deletion libretro/retro_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ t_button_cfg btnPAD[MAX_PADCFG] = {
CPC_KEY_JOY_LEFT, // DLEFT
CPC_KEY_JOY_RIGHT, // DRIGHT
CPC_KEY_JOY_FIRE1, // A
CPC_KEY_NULL, // X
CPC_KEY_JOY_FIRE3, // X
//---------------------
CPC_KEY_CONTROL, // L
CPC_KEY_INTRO, // R
Expand Down
4 changes: 3 additions & 1 deletion libretro/retro_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ enum emu_key_id {
CPC_KEY_JOY_RIGHT = 0x93,
CPC_KEY_JOY_FIRE1 = 0x94,
CPC_KEY_JOY_FIRE2 = 0x95,
CPC_KEY_SPARE = 0x96,
CPC_KEY_JOY_FIRE3 = 0x96,
CPC_KEY_DEL = 0x97,
/* Joystick 2 using Y-CABLE */
// http://www.cpcwiki.eu/index.php/Digital_Joysticks#Relevant_locations_in_Keyboard_Matrix
Expand Down Expand Up @@ -158,6 +158,8 @@ enum retro_joystick_button
JOY_PORT2_LEFT = 209,
JOY_PORT2_FIRE1 = 210,
JOY_PORT2_FIRE2 = 211,
JOY_PORT2_FIRE3 = 212,
JOY_PORT1_FIRE3 = 213,
};

enum retro_events_action_type
Expand Down

0 comments on commit 7ba8a88

Please sign in to comment.