Fix enter

This commit is contained in:
Michal Moskal 2017-07-06 12:26:18 +01:00
parent afc5e643d5
commit cbbc51641e

View File

@ -122,7 +122,7 @@ void *buttonPoll(void *arg) {
if ((prevState & BUTTON_ID_ESCAPE) && !(state & BUTTON_ID_ESCAPE)) if ((prevState & BUTTON_ID_ESCAPE) && !(state & BUTTON_ID_ESCAPE))
target_reset(); target_reset();
prevState = state; prevState = state;
for (int i = 0; i < LastButtonID; ++i) { for (int i = 0; i <= LastButtonID; ++i) {
auto btn = &wb->buttons[i]; auto btn = &wb->buttons[i];
btn->setPressed(!!(state & btn->id)); btn->setPressed(!!(state & btn->id));
} }