| 26 | } |
| 27 | |
| 28 | void AddEvent(const event_t* ev) |
| 29 | { |
| 30 | if (ev->type != EV_KeyDown && ev->type != EV_KeyUp) |
| 31 | return; |
| 32 | |
| 33 | const int key = ev->data1; |
| 34 | KeyStatus.Set(key, ev->type == EV_KeyDown); |
| 35 | |
| 36 | // Check if key is to be excluded from setting AnyKeyStatus. |
| 37 | const bool ignore = key == KEY_VOLUMEDOWN || key == KEY_VOLUMEUP || |
| 38 | (key > KEY_LASTJOYBUTTON && key < KEY_PAD_LTHUMB_RIGHT); |
| 39 | |
| 40 | if (KeyStatus[key] && !ignore) |
| 41 | AnyKeyStatus = true; |
| 42 | } |
| 43 | |
| 44 | void ClearAllInput() |
| 45 | { |
no test coverage detected