aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/n64/osys_n64_events.cpp
diff options
context:
space:
mode:
authorFabio Battaglia2010-01-15 23:35:24 +0000
committerFabio Battaglia2010-01-15 23:35:24 +0000
commitc4a9d373ca30eed9df9aaf555f9798d131f0dd19 (patch)
tree42b3b9f0f9f49ab88c013fde0ad82582ba7848cc /backends/platform/n64/osys_n64_events.cpp
parentf1439b4fa7246c97820c69bf12625e9ec50e2221 (diff)
downloadscummvm-rg350-c4a9d373ca30eed9df9aaf555f9798d131f0dd19.tar.gz
scummvm-rg350-c4a9d373ca30eed9df9aaf555f9798d131f0dd19.tar.bz2
scummvm-rg350-c4a9d373ca30eed9df9aaf555f9798d131f0dd19.zip
N64: Use first controller found as input, easier to add support for different input peripherals now
svn-id: r47317
Diffstat (limited to 'backends/platform/n64/osys_n64_events.cpp')
-rw-r--r--backends/platform/n64/osys_n64_events.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/platform/n64/osys_n64_events.cpp b/backends/platform/n64/osys_n64_events.cpp
index 13d04888cb..b0c7ac191d 100644
--- a/backends/platform/n64/osys_n64_events.cpp
+++ b/backends/platform/n64/osys_n64_events.cpp
@@ -60,7 +60,7 @@ bool OSystem_N64::pollEvent(Common::Event &event) {
controller_Read_Buttons(_ctrlData);
static uint16 oldButtons = 0; // old button data... used for button press/release
- uint16 newButtons = _ctrlData->c[0].buttons; // Read from controller 0
+ uint16 newButtons = _ctrlData->c[_controllerNumber].buttons; // Read from controller
bool buttonPressed = false;
static bool left_digital = false;
@@ -68,8 +68,8 @@ bool OSystem_N64::pollEvent(Common::Event &event) {
static bool up_digital = false;
static bool down_digital = false;
- int8 analogX = (_ctrlData->c[0].throttle >> 8) & 0xFF;
- int8 analogY = (_ctrlData->c[0].throttle >> 0) & 0xFF;
+ int8 analogX = (_ctrlData->c[_controllerNumber].throttle >> 8) & 0xFF;
+ int8 analogY = (_ctrlData->c[_controllerNumber].throttle >> 0) & 0xFF;
if (newButtons != oldButtons) {
if (DL_BUTTON(newButtons) && !DL_BUTTON(oldButtons)) // Pressed LEFT