VERY experimental Nintendo Switch 2 emulator
C++
input_common/sdl/sdl_impl: Convert reinterpret_cast into a static_cast
Lioncashf0a45d70a896
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cppindex edd4affe26..c5589eb73c 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) {/// Creates a ParamPackage from an SDL_Event that can directly be used to create a ButtonDevicestatic Common::ParamPackage SDLEventToButtonParamPackage(SDLState& state, const SDL_Event& event);-static int SDLEventWatcher(void* userdata, SDL_Event* event) {- SDLState* sdl_state = reinterpret_cast<SDLState*>(userdata);+static int SDLEventWatcher(void* user_data, SDL_Event* event) {+ auto* const sdl_state = static_cast<SDLState*>(user_data);+// Don't handle the event if we are configuringif (sdl_state->polling) {sdl_state->event_queue.Push(*event);} else {sdl_state->HandleGameControllerEvent(*event);}+return 0;}