| 489 | } |
| 490 | |
| 491 | void Platform::input_event(const InputEvent &input_event) |
| 492 | { |
| 493 | if (process_input_events && active_app) |
| 494 | { |
| 495 | active_app->input_event(input_event); |
| 496 | } |
| 497 | |
| 498 | if (input_event.get_source() == EventSource::Keyboard) |
| 499 | { |
| 500 | const auto &key_event = static_cast<const KeyInputEvent &>(input_event); |
| 501 | |
| 502 | if (key_event.get_code() == KeyCode::Back || |
| 503 | key_event.get_code() == KeyCode::Escape) |
| 504 | { |
| 505 | close(); |
| 506 | } |
| 507 | } |
| 508 | } |
| 509 | |
| 510 | void Platform::resize(uint32_t width, uint32_t height) |
| 511 | { |
no test coverage detected