// Copyright 2015 Citra Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. #pragma once #include #include #include "input_common/input_common.h" namespace InputCommon { class SDLController : virtual public ControllerBase { public: SDLController(); ~SDLController(); ///Initializes input via SDL2 bool Init(); ///Grabs a list of devices supported by the backend void DiscoverDevices(); ///Grab and process input via SDL2 void Poll(); ///Shuts down all joysticks opened by SDL2 void ShutDown(); ///SDL event used for polling SDL_Event input_event; private: std::string name; SDL_Joystick* j_pad; ///Index of joystick, used for opening/closing a joystick int index; }; } //namespace