14 #ifdef SDL_VIDEO_DRIVER_WINDOWS
16 #include <SDL2/SDL_syswm.h>
22 struct SdlWindowsPlatform::Impl
30 m_impl->signal_evt = CreateEventA(
nullptr,
false,
false,
"");
31 if (m_impl->signal_evt == NULL)
33 cerr <<
"Error: CreateEventA() failed with code " << GetLastError() << endl;
39 CloseHandle(m_impl->signal_evt);
49 DWORD retval = MsgWaitForMultipleObjectsEx(1,
50 &(m_impl->signal_evt),
54 if (retval == WAIT_FAILED)
56 cerr <<
"Error: MsgWaitForMultipleObjectsEx() failed with code "
57 << GetLastError() << endl;
59 if (ResetEvent(m_impl->signal_evt) == NULL)
61 cerr <<
"Error: ResetEvent() failed with code " << GetLastError() << endl;
67 if (SetEvent(m_impl->signal_evt) == NULL)
69 cerr <<
"Error: SetEvent() failed with code " << GetLastError() << endl;
73 #endif // SDL_VIDEO_DRIVER_WINDOWS