From 9c3510d44926e90b9dd6abf413a7ec9c92dc0ba8 Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Wed, 1 Dec 2021 20:44:12 +0800 Subject: [PATCH] input: don't assign analog stick as dpad by default for PSX core. --- joymapping.cpp | 4 ++-- user_io.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/joymapping.cpp b/joymapping.cpp index 55ad4df7..2b2902d1 100644 --- a/joymapping.cpp +++ b/joymapping.cpp @@ -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]; diff --git a/user_io.h b/user_io.h index 58eb9757..31e2406d 100644 --- a/user_io.h +++ b/user_io.h @@ -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)