| 636 | /////////////////////////////////////////// |
| 637 | |
| 638 | void platform_win_destroy(platform_win_t window) { |
| 639 | window_t* win = &uwp_windows[window]; |
| 640 | |
| 641 | // Message the window thread to stop, and then wait for it. |
| 642 | win->run_thread = false; |
| 643 | while (win->thread_running == true) { |
| 644 | Sleep(1); |
| 645 | } |
| 646 | |
| 647 | if (win->has_swapchain) { |
| 648 | skg_swapchain_destroy(&win->swapchain); |
| 649 | } |
| 650 | |
| 651 | ft_mutex_destroy(&win->event_mtx); |
| 652 | |
| 653 | win->events.free(); |
| 654 | sk_free(win->title); |
| 655 | *win = {}; |
| 656 | } |
| 657 | |
| 658 | /////////////////////////////////////////// |
| 659 |
no test coverage detected