From 5cc2a7c09e03ef4e9240fa50a7948a81c5278035 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 22 May 2023 23:22:30 +0200 Subject: [PATCH] input: fix emulated pad stick y axis --- rpcs3/Emu/Io/pad_types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Io/pad_types.cpp b/rpcs3/Emu/Io/pad_types.cpp index 07247c06f7..e6d7b9d17d 100644 --- a/rpcs3/Emu/Io/pad_types.cpp +++ b/rpcs3/Emu/Io/pad_types.cpp @@ -125,9 +125,9 @@ u32 get_axis_keycode(u32 offset, u16 value) switch (offset) { case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X: return static_cast(value > 127 ? axis_direction::positive : axis_direction::negative); - case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y: return static_cast(value > 127 ? axis_direction::positive : axis_direction::negative); + case CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y: return static_cast(value < 128 ? axis_direction::positive : axis_direction::negative); case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X: return static_cast(value > 127 ? axis_direction::positive : axis_direction::negative); - case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y: return static_cast(value > 127 ? axis_direction::positive : axis_direction::negative); + case CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y: return static_cast(value < 128 ? axis_direction::positive : axis_direction::negative); default: return static_cast(axis_direction::both); } }