| 289 | } |
| 290 | |
| 291 | bool KNativeInputSDL::processEvents() { |
| 292 | SDL_Event e = {}; |
| 293 | |
| 294 | while (SDL_PollEvent(&e) == 1) { |
| 295 | #ifdef BOXEDWINE_MULTI_THREADED |
| 296 | if (e.type == sdlCustomEvent) { |
| 297 | SdlCallback* callback = (SdlCallback*)e.user.data1; |
| 298 | callback->result = (U32)callback->pfn(); |
| 299 | BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(callback->cond); |
| 300 | BOXEDWINE_CONDITION_SIGNAL(callback->cond); |
| 301 | } else |
| 302 | #endif |
| 303 | if (!handlSdlEvent(&e)) { |
| 304 | return false; |
| 305 | } |
| 306 | } |
| 307 | return true; |
| 308 | } |
| 309 | |
| 310 | #ifndef SDLK_NUMLOCK |
| 311 | #define SDLK_NUMLOCK SDL_SCANCODE_NUMLOCKCLEAR |
no test coverage detected