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)
154
154
return FALSE ; // unknown key ???
155
155
}
156
156
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
+ }
158
162
void CInput::ClipCursor (bool clip)
159
163
{
160
164
if (clip)
@@ -283,7 +287,6 @@ void CInput::OnFrame(void)
283
287
#endif
284
288
{
285
289
mouseState[event.button .button ] = FALSE ;
286
- // cbStack.back()->IR_OnMouseRelease(event.button.button);
287
290
cbStack.back ()->IR_OnKeyboardRelease (SDL_NUM_SCANCODES + event.button .button );
288
291
}
289
292
break ;
@@ -293,11 +296,7 @@ void CInput::OnFrame(void)
293
296
#endif
294
297
{
295
298
mouseState[event.button .button ] = TRUE ;
296
- // cbStack.back()->IR_OnMousePress(event.button.button);
297
299
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 );
301
300
}
302
301
break ;
303
302
case SDL_MOUSEWHEEL:
You can’t perform that action at this time.
0 commit comments