MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / waitForEvent

Method waitForEvent

platform/sdl/knativeinputSDL.cpp:271–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271bool KNativeInputSDL::waitForEvent(U32 ms) {
272 SDL_Event e = { 0 };
273 if (SDL_WaitEventTimeout(&e, ms) == 1) {
274#ifdef BOXEDWINE_MULTI_THREADED
275 if (e.type == sdlCustomEvent) {
276 SdlCallback* callback = (SdlCallback*)e.user.data1;
277 if (callback->pfn) {
278 callback->result = (U32)callback->pfn();
279 }
280 BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(callback->cond);
281 BOXEDWINE_CONDITION_SIGNAL(callback->cond);
282 return true;
283 }
284#endif
285 handlSdlEvent(&e);
286 return true;
287 }
288 return false;
289}
290
291bool KNativeInputSDL::processEvents() {
292 SDL_Event e = {};

Callers 1

doMainLoopFunction · 0.80

Calls 1

SDL_WaitEventTimeoutFunction · 0.85

Tested by

no test coverage detected