From cf0d01a5d775f318f7cf1045a2a2a792b15111e6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Jun 2019 15:50:04 -0400 Subject: input_common/sdl: Remove unused header includes and forward declarations Gets rid of a few unnecessary inclusion dependencies. It also uncovered a few indirect inclusion dependencies being relied upon. --- src/input_common/sdl/sdl_impl.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/input_common/sdl/sdl_impl.h') diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h index 2579741d6..fadcf3139 100644 --- a/src/input_common/sdl/sdl_impl.h +++ b/src/input_common/sdl/sdl_impl.h @@ -6,7 +6,10 @@ #include #include +#include #include +#include +#include "common/common_types.h" #include "common/threadsafe_queue.h" #include "input_common/sdl/sdl.h" @@ -16,9 +19,9 @@ using SDL_JoystickID = s32; namespace InputCommon::SDL { -class SDLJoystick; -class SDLButtonFactory; class SDLAnalogFactory; +class SDLButtonFactory; +class SDLJoystick; class SDLState : public State { public: -- cgit v1.2.3 From cfac942e633d20793c75389bad6f0180d85bc1e1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Jun 2019 16:42:17 -0400 Subject: input_common/sdl/sdl_impl: Move documentation comments to header where applicable Places the documentation comments with the rest of SDLState's member function documentation. --- src/input_common/sdl/sdl_impl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/input_common/sdl/sdl_impl.h') diff --git a/src/input_common/sdl/sdl_impl.h b/src/input_common/sdl/sdl_impl.h index fadcf3139..606a32c5b 100644 --- a/src/input_common/sdl/sdl_impl.h +++ b/src/input_common/sdl/sdl_impl.h @@ -34,7 +34,13 @@ public: /// Handle SDL_Events for joysticks from SDL_PollEvent void HandleGameControllerEvent(const SDL_Event& event); + /// Get the nth joystick with the corresponding GUID std::shared_ptr GetSDLJoystickBySDLID(SDL_JoystickID sdl_id); + + /** + * Check how many identical joysticks (by guid) were connected before the one with sdl_id and so + * tie it to a SDLJoystick with the same guid and that port + */ std::shared_ptr GetSDLJoystickByGUID(const std::string& guid, int port); /// Get all DevicePoller that use the SDL backend for a specific device type -- cgit v1.2.3