File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ BOOL CInput::iGetAsyncKeyState(int dik)
154154 return FALSE ; // unknown key ???
155155}
156156
157- BOOL CInput::iGetAsyncBtnState (int btn) { return !!mouseState[btn]; }
157+ BOOL CInput::iGetAsyncBtnState (int btn)
158+ {
159+ if (btn <= COUNT_MOUSE_BUTTONS)
160+ return !!mouseState[btn + 1 ];
161+ }
158162void CInput::ClipCursor (bool clip)
159163{
160164 if (clip)
@@ -283,7 +287,6 @@ void CInput::OnFrame(void)
283287#endif
284288 {
285289 mouseState[event.button .button ] = FALSE ;
286- // cbStack.back()->IR_OnMouseRelease(event.button.button);
287290 cbStack.back ()->IR_OnKeyboardRelease (SDL_NUM_SCANCODES + event.button .button );
288291 }
289292 break ;
@@ -293,11 +296,7 @@ void CInput::OnFrame(void)
293296#endif
294297 {
295298 mouseState[event.button .button ] = TRUE ;
296- // cbStack.back()->IR_OnMousePress(event.button.button);
297299 cbStack.back ()->IR_OnKeyboardPress (SDL_NUM_SCANCODES + event.button .button );
298-
299- if (mouseState[event.button .button ])
300- cbStack.back ()->IR_OnMouseHold (event.button .button );
301300 }
302301 break ;
303302 case SDL_MOUSEWHEEL:
You can’t perform that action at this time.
0 commit comments