From 46a39029d1072318d5bac8990f86f10ef6455124 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 23 Feb 2011 20:44:40 -0600 Subject: [PATCH] fix compile on windows --- src/arch/InputHandler/InputHandler_DirectInput.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 2b288d1d9b..941bfde39d 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -412,12 +412,14 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) val = state.lY; break; case DIMOFS_Z: - neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; - val = state.lZ; + { + neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; + val = state.lZ; - float l = SCALE( int(val), -120.0f, 120.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + float l = SCALE( int(val), -120.0f, 120.0f, 0.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + } break; default: LOG->MapLog( "unknown input", "Mouse '%s' is returning an unknown mouse offset, %i",