| 6 | #include "../../ProgramLog/error/win32.hpp" |
| 7 | |
| 8 | DWORD WINAPI XamlThread::ThreadProc(LPVOID param) |
| 9 | { |
| 10 | const auto that = static_cast<XamlThread *>(param); |
| 11 | that->ThreadInit(); |
| 12 | that->m_Ready.SetEvent(); |
| 13 | |
| 14 | BOOL ret; |
| 15 | MSG msg; |
| 16 | while ((ret = GetMessage(&msg, Window::NullWindow, 0, 0)) != 0) |
| 17 | { |
| 18 | if (ret != -1) |
| 19 | { |
| 20 | if (!that->PreTranslateMessage(msg)) |
| 21 | { |
| 22 | TranslateMessage(&msg); |
| 23 | DispatchMessage(&msg); |
| 24 | } |
| 25 | } |
| 26 | else |
| 27 | { |
| 28 | LastErrorHandle(spdlog::level::critical, L"Failed to get message"); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | delete that; |
| 33 | winrt::uninit_apartment(); |
| 34 | return static_cast<DWORD>(msg.wParam); |
| 35 | } |
| 36 | |
| 37 | void XamlThread::DeletedCallback(void *data) |
| 38 | { |
nothing calls this directly
no test coverage detected