From 1d82b785df70ef8992d5e14837801e356facb65a Mon Sep 17 00:00:00 2001 From: Sacha Date: Thu, 10 Jan 2013 20:25:10 +1000 Subject: [PATCH] Fix joystick keys --- base/BlackberryMain.cpp | 8 ++++---- base/QtMain.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/BlackberryMain.cpp b/base/BlackberryMain.cpp index 86467e498e..8f82335e81 100644 --- a/base/BlackberryMain.cpp +++ b/base/BlackberryMain.cpp @@ -121,13 +121,13 @@ void SimulateGamepad(InputState *input) { input->pad_rstick_x = 0; input->pad_rstick_y = 0; - if (input->pad_buttons | (1<<14)) + if (input->pad_buttons & (1<<14)) input->pad_lstick_y=1; - else if (input->pad_buttons | (1<<15)) + else if (input->pad_buttons & (1<<15)) input->pad_lstick_y=-1; - if (input->pad_buttons | (1<<16)) + if (input->pad_buttons & (1<<16)) input->pad_lstick_x=-1; - else if (input->pad_buttons | (1<<17)) + else if (input->pad_buttons & (1<<17)) input->pad_lstick_x=1; } diff --git a/base/QtMain.cpp b/base/QtMain.cpp index ee74314d0c..469eb4135f 100644 --- a/base/QtMain.cpp +++ b/base/QtMain.cpp @@ -26,13 +26,13 @@ void SimulateGamepad(InputState *input) { input->pad_rstick_x = 0; input->pad_rstick_y = 0; - if (input->pad_buttons | (1<<14)) + if (input->pad_buttons & (1<<14)) input->pad_lstick_y=1; - else if (input->pad_buttons | (1<<15)) + else if (input->pad_buttons & (1<<15)) input->pad_lstick_y=-1; - if (input->pad_buttons | (1<<16)) + if (input->pad_buttons & (1<<16)) input->pad_lstick_x=-1; - else if (input->pad_buttons | (1<<17)) + else if (input->pad_buttons & (1<<17)) input->pad_lstick_x=1; }