| 226 | // ---------------------------------------------------------------------------- |
| 227 | |
| 228 | void ddio_KeyFlush() { |
| 229 | int i; |
| 230 | |
| 231 | if (!DDIO_key_init) |
| 232 | return; |
| 233 | |
| 234 | // flush out internal key input system by gathering all data in buffer. |
| 235 | DDIO_key_queue.head = DDIO_key_queue.tail = 0; |
| 236 | |
| 237 | for (i = 0; i < KEY_QUEUE_SIZE; i++) { |
| 238 | DDIO_key_queue.buffer[i] = 0; |
| 239 | } |
| 240 | |
| 241 | // flush keyboard array too |
| 242 | for (i = 0; i < DDIO_MAX_KEYS; i++) { |
| 243 | DDIO_key_down_count[i] = 0; |
| 244 | DDIO_key_state[i] = 0; |
| 245 | ddio_InternalResetKey(i); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | void ddio_KeyFlushKey(int key) { |
| 250 | DDIO_key_down_count[key] = 0; |
no test coverage detected