From c4a9d373ca30eed9df9aaf555f9798d131f0dd19 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Fri, 15 Jan 2010 23:35:24 +0000 Subject: N64: Use first controller found as input, easier to add support for different input peripherals now svn-id: r47317 --- backends/platform/n64/osys_n64_events.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/platform/n64/osys_n64_events.cpp') 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 -- cgit v1.2.3