| 434 | } |
| 435 | |
| 436 | void GDKPlatform::Tick() |
| 437 | { |
| 438 | PROFILE_CPU_NAMED("Application.Tick"); |
| 439 | |
| 440 | GDKInput::Update(); |
| 441 | |
| 442 | // Handle callbacks in the main thread to ensure thread safety |
| 443 | while (XTaskQueueDispatch(TaskQueue, XTaskQueuePort::Completion, 0)) |
| 444 | { |
| 445 | } |
| 446 | |
| 447 | // Check to see if any messages are waiting in the queue |
| 448 | MSG msg; |
| 449 | while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) |
| 450 | { |
| 451 | // Translate the message and dispatch it to WindowProc() |
| 452 | TranslateMessage(&msg); |
| 453 | DispatchMessage(&msg); |
| 454 | } |
| 455 | } |
| 456 | |
| 457 | void GDKPlatform::BeforeExit() |
| 458 | { |