From 2d5e08f28833f73cf5627a28552b5921da14bb66 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 26 Aug 2005 17:37:30 +0000 Subject: [PATCH] hack for testing all 8 players w/ only one joystick --- stepmania/src/ScreenJoinMultiplayer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ScreenJoinMultiplayer.cpp b/stepmania/src/ScreenJoinMultiplayer.cpp index 0bb66113ea..b88cb4ed51 100644 --- a/stepmania/src/ScreenJoinMultiplayer.cpp +++ b/stepmania/src/ScreenJoinMultiplayer.cpp @@ -115,7 +115,8 @@ void ScreenJoinMultiplayer::Input( const DeviceInput& DeviceI, const InputEventT // Translate input and sent to the appropriate player. Assume that all // joystick devices are mapped the same as the master player. - if( DeviceI.device >= DEVICE_JOY1 && + if( type == IET_FIRST_PRESS && + DeviceI.device >= DEVICE_JOY1 && DeviceI.device < DEVICE_JOY1 + NUM_MultiPlayer ) { DeviceInput di = DeviceI; @@ -130,6 +131,14 @@ void ScreenJoinMultiplayer::Input( const DeviceInput& DeviceI, const InputEventT MultiPlayer p = (MultiPlayer)(DeviceI.device - DEVICE_JOY1); + // testing hack + if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD,KEY_LSHIFT) ) ) + p = (MultiPlayer)(p + 1); + if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD,KEY_LCTRL) ) ) + p = (MultiPlayer)(p + 2); + if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD,KEY_LALT) ) ) + p = (MultiPlayer)(p + 4); + ASSERT( p>=0 && p