diff options
-rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index 934339d3b..6e8376549 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -475,12 +475,11 @@ SDLState::SDLState() { initialized = true; if (start_thread) { - poll_thread = std::thread([&] { + poll_thread = std::thread([this] { using namespace std::chrono_literals; - SDL_Event event; while (initialized) { SDL_PumpEvents(); - std::this_thread::sleep_for(std::chrono::duration(10ms)); + std::this_thread::sleep_for(10ms); } }); } |