Browse Source
Merge pull request #2254 from lioncash/redundant
input_common/sdl_impl: Minor cleanup in SDLState constructor
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
src/input_common/sdl/sdl_impl.cpp
|
|
@ -475,12 +475,11 @@ SDLState::SDLState() { |
|
|
|
|
|
|
|
|
initialized = true; |
|
|
initialized = true; |
|
|
if (start_thread) { |
|
|
if (start_thread) { |
|
|
poll_thread = std::thread([&] { |
|
|
|
|
|
|
|
|
poll_thread = std::thread([this] { |
|
|
using namespace std::chrono_literals; |
|
|
using namespace std::chrono_literals; |
|
|
SDL_Event event; |
|
|
|
|
|
while (initialized) { |
|
|
while (initialized) { |
|
|
SDL_PumpEvents(); |
|
|
SDL_PumpEvents(); |
|
|
std::this_thread::sleep_for(std::chrono::duration(10ms)); |
|
|
|
|
|
|
|
|
std::this_thread::sleep_for(10ms); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|