From a05fe7e8ab86567acb8957e6f2ce7e8183e6b049 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 14 Sep 2006 20:37:41 +0000 Subject: [PATCH] simplify GameToMenu --- stepmania/src/InputMapper.cpp | 4 ++-- stepmania/src/InputMapper.h | 2 +- stepmania/src/StepMania.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stepmania/src/InputMapper.cpp b/stepmania/src/InputMapper.cpp index 02a198c679..f6c0389d6a 100644 --- a/stepmania/src/InputMapper.cpp +++ b/stepmania/src/InputMapper.cpp @@ -769,10 +769,10 @@ PlayerNumber InputMapper::ControllerToPlayerNumber( GameController controller ) return (PlayerNumber) controller; } -void InputMapper::GameToMenu( const GameInput &GameI, MenuInput &MenuI ) +MenuButton InputMapper::GameToMenu( const GameInput &GameI ) { const Game* pGame = GAMESTATE->GetCurrentGame(); - MenuI.button = pGame->GameInputToMenuButton( GameI ); + return pGame->GameInputToMenuButton( GameI ); } void InputMapper::MenuToGame( const MenuInput &MenuI, PlayerNumber pn, GameInput GameIout[4] ) diff --git a/stepmania/src/InputMapper.h b/stepmania/src/InputMapper.h index dcca0d2111..89e782274c 100644 --- a/stepmania/src/InputMapper.h +++ b/stepmania/src/InputMapper.h @@ -36,7 +36,7 @@ public: bool DeviceToGame( const DeviceInput &DeviceI, GameInput& GameI ); // return true if there is a mapping from device to pad bool GameToDevice( const GameInput &GameI, int iSlotNum, DeviceInput& DeviceI ); // return true if there is a mapping from pad to device - void GameToMenu( const GameInput &GameI, MenuInput &MenuI ); + MenuButton GameToMenu( const GameInput &GameI ); void MenuToGame( const MenuInput &MenuI, PlayerNumber pn, GameInput GameIout[4] ); PlayerNumber ControllerToPlayerNumber( GameController controller ); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index f5c72fb10d..7086931742 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1431,7 +1431,7 @@ void HandleInputEvents(float fDeltaTime) if( input.GameI.IsValid() ) { - INPUTMAPPER->GameToMenu( input.GameI, input.MenuI ); + input.MenuI = INPUTMAPPER->GameToMenu( input.GameI ); input.pn = INPUTMAPPER->ControllerToPlayerNumber( input.GameI.controller ); }