Skip to content

Commit

Permalink
input: don't assign analog stick as dpad by default for PSX core.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorgelig committed Dec 1, 2021
1 parent 063cb52 commit 9c3510d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions joymapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ void map_joystick(uint32_t *map, uint32_t *mmap)
map[SYS_BTN_DOWN] = mmap[SYS_BTN_DOWN] & 0xFFFF;
map[SYS_BTN_UP] = mmap[SYS_BTN_UP] & 0xFFFF;

if (mmap[SYS_AXIS_X])
if (mmap[SYS_AXIS_X] && !is_psx())
{
uint32_t key = KEY_EMU + (((uint16_t)mmap[SYS_AXIS_X]) << 1);
map[SYS_BTN_LEFT] = (key << 16) | map[SYS_BTN_LEFT];
map[SYS_BTN_RIGHT] = ((key+1) << 16) | map[SYS_BTN_RIGHT];
}

if (mmap[SYS_AXIS_Y])
if (mmap[SYS_AXIS_Y] && !is_psx())
{
uint32_t key = KEY_EMU + (((uint16_t)mmap[SYS_AXIS_Y]) << 1);
map[SYS_BTN_UP] = (key << 16) | map[SYS_BTN_UP];
Expand Down
1 change: 1 addition & 0 deletions user_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ char is_archie();
char is_gba();
char is_c64();
char is_st();
char is_psx();
char is_arcade();

#define HomeDir(x) user_io_get_core_path(x)
Expand Down

0 comments on commit 9c3510d

Please sign in to comment.