Closed erfg12 closed 5 years ago
Could the reason for the double clicking be that events are fired both on SDL_JOYBUTTONUP and SDL_JOYBUTTONDOWN? Any good reason to do so? This appears to be different than how the keyboard and mouse are handled where events are only fired on the down event.
Why would that be? Joybuttonup events are ignored in the controller handling code.
Why else would a button press result in two events in the game?
Because the switch buttons might bounce, e.g. generate two joydown events on a single press?
But if you look at the code, nothing happened on joyup.
In that case, wouldn't the right thing to do be to filter it in the event mapper so that the game doesn't have to deal with unintentional events?
The issues here (double casting, spell not ready) seem to be fixed already by PR #24 . Maybe they were just artefacts of not properly generating DVL_ events and using PressKey() PressChar() directly in the event mapper.
looks good. merging
@lantus this PR broke building with _DEBUG
enabled. The number of opening branches no longer matches closing branches. See line 350, it's supposed to close at line 470 but that has now been removed.
Why did you merge this broken PR?