bool SdlEventSource::pollEvent(Common::Event &event) { handleKbdMouse(); #if SDL_VERSION_ATLEAST(2, 0, 0) // In case we still need to send a key up event for a key down from a // TEXTINPUT event we do this immediately. if (_queuedFakeKeyUp) { event = _fakeKeyUp; _queuedFakeKeyUp = false; return true; } #endif // If the screen changed, send an Common::EVENT_SCREEN_CHANGED int screenID = ((OSystem_SDL *)g_system)->getGraphicsManager()->getScreenChangeID(); if (screenID != _lastScreenID) { _lastScreenID = screenID; event.type = Common::EVENT_SCREEN_CHANGED; return true; } SDL_Event ev; while (SDL_PollEvent(&ev)) { preprocessEvents(&ev); if (dispatchSDLEvent(ev, event)) return true; } return false; }
bool OSystem_SDL::pollEvent(Common::Event &event) { SDL_Event ev; handleKbdMouse(); /* Residual doesn't support this // If the screen mode changed, send an Common::EVENT_SCREEN_CHANGED if (_modeChanged) { _modeChanged = false; event.type = Common::EVENT_SCREEN_CHANGED; return true; } */ while (SDL_PollEvent(&ev)) { preprocessEvents(&ev); if (dispatchSDLEvent(ev, event)) return true; } return false; }
bool SdlEventSource::pollEvent(Common::Event &event) { handleKbdMouse(); // If the screen changed, send an Common::EVENT_SCREEN_CHANGED int screenID = ((OSystem_SDL *)g_system)->getGraphicsManager()->getScreenChangeID(); if (screenID != _lastScreenID) { _lastScreenID = screenID; event.type = Common::EVENT_SCREEN_CHANGED; return true; } SDL_Event ev; while (SDL_PollEvent(&ev)) { preprocessEvents(&ev); if (dispatchSDLEvent(ev, event)) return true; } return false; }