| 47 | } |
| 48 | |
| 49 | void XamlThread::ThreadInit() |
| 50 | { |
| 51 | try |
| 52 | { |
| 53 | winrt::init_apartment(winrt::apartment_type::single_threaded); |
| 54 | } |
| 55 | HresultErrorCatch(spdlog::level::critical, L"Failed to initialize thread apartment"); |
| 56 | |
| 57 | m_Manager = UWP::CreateXamlManager(); |
| 58 | m_Dispatcher = winrt::Windows::System::DispatcherQueue::GetForCurrentThread(); |
| 59 | } |
| 60 | |
| 61 | bool XamlThread::PreTranslateMessage(const MSG &msg) |
| 62 | { |