ppsspp/SDL/SDLJoystick.h
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00

32 lines
705 B
C++

#pragma once
#ifdef _MSC_VER
#include "SDL/SDL.h"
#include "SDL/SDL_thread.h"
#else
#include "SDL.h"
#include "SDL_thread.h"
#endif
#include <map>
#include "Common/Input/InputState.h"
#include "Common/Input/KeyCodes.h"
#include "Common/Net/Resolve.h"
class SDLJoystick{
public:
SDLJoystick(bool init_SDL = false);
~SDLJoystick();
void registerEventHandler();
void ProcessInput(SDL_Event &event);
private:
void setUpController(int deviceIndex);
void setUpControllers();
keycode_t getKeycodeForButton(SDL_GameControllerButton button);
int getDeviceIndex(int instanceId);
bool registeredAsEventHandler;
std::vector<SDL_GameController *> controllers;
std::map<int, int> controllerDeviceMap;
};