-
Notifications
You must be signed in to change notification settings - Fork 104
The buttons MouseButtonWheelUp and MouseButtonWheelDown don't work. #42
Comments
@Commondor This reply might be a tad late and may not concern you anymore, but I will leave it here in case others run into this problem and find their way here via Google search, like I did. I don't believe you are doing anything wrong in your code, but rather those two particular buttons (MouseButtonWheelUp and MouseButtonWheelDown) don't seem to be properly handled (in the Windows implementation, at least; haven't checked the others). What I've done was to modify gainput::InputDeviceMouseImplWin::Update(InputDeltaState*) in the file GainputInputDeviceMouseWin.h with the following changes:
The idea is to reset those two button states during the next frame's update, rather than the current. Note that MouseButtonWheelUp and MouseButtonWheelDown are the same as MouseButton3 and MouseButton4, respectively. @jkuhlmann I have tested these changes locally and the behavior is what I expected/wanted. Please consider integrating this fix into your code base, if you consider it to be satisfactory, |
@jkuhlmann - just ran into this issue and @iftodebogdan 's fix worked great, integrated that in the Update function of GainputInputDeviceMouseWinRaw. |
This fix also worked for me, thanks! |
Thanks! This post helped me too! I just wish the maintainer would merge some of these pull requests.... |
The buttons gainput::MouseButtonWheelUp and gainput::MouseButtonWheelDown don't work.
My code example:
m_InputMap.MapBool ( EButton::MouseWheelUp, m_MouseId, gainput::MouseButtonWheelUp );
m_InputMap.MapBool ( EButton::MenuUp, m_PadId, gainput::PadButtonUp );
m_InputMap.MapBool ( EButton::MouseWheelDown, m_MouseId, gainput::MouseButtonWheelDown );
m_InputMap.MapBool ( EButton::MenuDown, m_PadId, gainput::PadButtonDown );
// Checks for a "menu up" input action.
bool IsMenuUp() { return m_InputMap.GetBoolWasDown( EButton::MenuUp ) || m_InputMap.GetBool( EButton::MouseWheelUp ); }
// Checks for a "menu down" input action.
bool IsMenuDown() { return m_InputMap.GetBoolWasDown( EButton::MenuDown ) || m_InputMap.GetBool( EButton::MouseWheelDown ); }
What am I doing wrong?
The text was updated successfully, but these errors were encountered: