summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/joypad_linux.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linuxbsd/joypad_linux.cpp')
-rw-r--r--platform/linuxbsd/joypad_linux.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp
index fda1358dfd..4a9d0a8181 100644
--- a/platform/linuxbsd/joypad_linux.cpp
+++ b/platform/linuxbsd/joypad_linux.cpp
@@ -459,9 +459,9 @@ void JoypadLinux::process_joypads() {
case ABS_HAT0X:
if (ev.value != 0) {
if (ev.value < 0) {
- joy->dpad |= Input::HAT_MASK_LEFT;
+ joy->dpad = (joy->dpad | Input::HAT_MASK_LEFT) & ~Input::HAT_MASK_RIGHT;
} else {
- joy->dpad |= Input::HAT_MASK_RIGHT;
+ joy->dpad = (joy->dpad | Input::HAT_MASK_RIGHT) & ~Input::HAT_MASK_LEFT;
}
} else {
joy->dpad &= ~(Input::HAT_MASK_LEFT | Input::HAT_MASK_RIGHT);
@@ -473,9 +473,9 @@ void JoypadLinux::process_joypads() {
case ABS_HAT0Y:
if (ev.value != 0) {
if (ev.value < 0) {
- joy->dpad |= Input::HAT_MASK_UP;
+ joy->dpad = (joy->dpad | Input::HAT_MASK_UP) & ~Input::HAT_MASK_DOWN;
} else {
- joy->dpad |= Input::HAT_MASK_DOWN;
+ joy->dpad = (joy->dpad | Input::HAT_MASK_DOWN) & ~Input::HAT_MASK_UP;
}
} else {
joy->dpad &= ~(Input::HAT_MASK_UP | Input::HAT_MASK_DOWN);