diff options
| author | 2019-06-03 16:19:22 -0400 | |
|---|---|---|
| committer | 2019-06-03 16:56:46 -0400 | |
| commit | b73ea457cc9870b7846982a4d8633b368fe02e9a (patch) | |
| tree | 2bc4e038ce3246735b33a2a5fa81c7db47d6f81c /src/input_common/sdl/sdl_impl.cpp | |
| parent | input_common/sdl/sdl_impl: Use insert_or_assign() where applicable (diff) | |
| download | yuzu-b73ea457cc9870b7846982a4d8633b368fe02e9a.tar.gz yuzu-b73ea457cc9870b7846982a4d8633b368fe02e9a.tar.xz yuzu-b73ea457cc9870b7846982a4d8633b368fe02e9a.zip | |
input_common/sdl/sdl_impl: Convert reinterpret_cast into a static_cast
It's valid to static_cast a void pointer back into its proper type.
Diffstat (limited to 'src/input_common/sdl/sdl_impl.cpp')
| -rw-r--r-- | src/input_common/sdl/sdl_impl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index edd4affe2..c5589eb73 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp | |||
| @@ -33,14 +33,16 @@ static std::string GetGUID(SDL_Joystick* joystick) { | |||
| 33 | /// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevice | 33 | /// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevice |
| 34 | static Common::ParamPackage SDLEventToButtonParamPackage(SDLState& state, const SDL_Event& event); | 34 | static Common::ParamPackage SDLEventToButtonParamPackage(SDLState& state, const SDL_Event& event); |
| 35 | 35 | ||
| 36 | static int SDLEventWatcher(void* userdata, SDL_Event* event) { | 36 | static int SDLEventWatcher(void* user_data, SDL_Event* event) { |
| 37 | SDLState* sdl_state = reinterpret_cast<SDLState*>(userdata); | 37 | auto* const sdl_state = static_cast<SDLState*>(user_data); |
| 38 | |||
| 38 | // Don't handle the event if we are configuring | 39 | // Don't handle the event if we are configuring |
| 39 | if (sdl_state->polling) { | 40 | if (sdl_state->polling) { |
| 40 | sdl_state->event_queue.Push(*event); | 41 | sdl_state->event_queue.Push(*event); |
| 41 | } else { | 42 | } else { |
| 42 | sdl_state->HandleGameControllerEvent(*event); | 43 | sdl_state->HandleGameControllerEvent(*event); |
| 43 | } | 44 | } |
| 45 | |||
| 44 | return 0; | 46 | return 0; |
| 45 | } | 47 | } |
| 46 | 48 | ||