input_common: Pump sdl events from main thread

This commit is contained in:
german77 2022-11-26 19:08:44 -06:00
parent 3ab8d9ac7c
commit 7d8095d944
6 changed files with 35 additions and 10 deletions

View file

@ -36,6 +36,8 @@ public:
/// Unregisters SDL device factories and shut them down.
~SDLDriver() override;
void PumpEvents() const;
/// Handle SDL_Events for joysticks from SDL_PollEvent
void HandleGameControllerEvent(const SDL_Event& event);
@ -128,7 +130,6 @@ private:
bool start_thread = false;
std::atomic<bool> initialized = false;
std::thread poll_thread;
std::thread vibration_thread;
};
} // namespace InputCommon