From 834d3fe336b066776c53b43b5682699622911acc Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 17 Mar 2019 04:02:48 -0400
Subject: [PATCH 1/3] input_common/sdl_impl: Remove unused variable in SDLState
 constructor

---
 src/input_common/sdl/sdl_impl.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 934339d3bc..c223f5843b 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -477,7 +477,6 @@ SDLState::SDLState() {
     if (start_thread) {
         poll_thread = std::thread([&] {
             using namespace std::chrono_literals;
-            SDL_Event event;
             while (initialized) {
                 SDL_PumpEvents();
                 std::this_thread::sleep_for(std::chrono::duration(10ms));

From d74aa13bd35e43652b7f8759639a65230971cadc Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 17 Mar 2019 03:19:55 -0400
Subject: [PATCH 2/3] input_common/sdl_impl: Remove unnecessary
 std::chrono::duration construction

Specifying the time unit itself is sufficient here.
---
 src/input_common/sdl/sdl_impl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index c223f5843b..991ef96838 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -479,7 +479,7 @@ SDLState::SDLState() {
             using namespace std::chrono_literals;
             while (initialized) {
                 SDL_PumpEvents();
-                std::this_thread::sleep_for(std::chrono::duration(10ms));
+                std::this_thread::sleep_for(10ms);
             }
         });
     }

From 114060fd87a8b8a869a20ba4b64f8bb40c37c7e6 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 17 Mar 2019 03:20:53 -0400
Subject: [PATCH 3/3] input_common/sdl_impl: Make lambda capture more specific
 in SDLState constructor

We don't need to universally capture by reference. We specifically just
need to capture the this pointer.
---
 src/input_common/sdl/sdl_impl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index 991ef96838..6e83765495 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -475,7 +475,7 @@ SDLState::SDLState() {
 
     initialized = true;
     if (start_thread) {
-        poll_thread = std::thread([&] {
+        poll_thread = std::thread([this] {
             using namespace std::chrono_literals;
             while (initialized) {
                 SDL_PumpEvents();