lantus / devilution-nx

Diablo for the Nintendo Switch
The Unlicense
859 stars 61 forks source link

prevent "spell not rdy" speech on exit dialog and makefile create dirs #23

Closed erfg12 closed 5 years ago

erfg12 commented 5 years ago
AJenbo commented 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.

rsn8887 commented 5 years ago

Why would that be? Joybuttonup events are ignored in the controller handling code.

AJenbo commented 5 years ago

Why else would a button press result in two events in the game?

rsn8887 commented 5 years ago

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.

AJenbo commented 5 years ago

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?

rsn8887 commented 5 years ago

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.

lantus commented 5 years ago

looks good. merging

AJenbo commented 5 years ago

@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.

rsn8887 commented 5 years ago

Why did you merge this broken PR?