Auto formated using vs code to fix tab vs spaces indentation issues.
This commit is contained in:
parent
d6769d052c
commit
55bf88547c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -9,84 +9,82 @@
|
||||||
#include "Qt/input.h"
|
#include "Qt/input.h"
|
||||||
#include "Qt/sdl.h"
|
#include "Qt/sdl.h"
|
||||||
|
|
||||||
#define MAX_JOYSTICKS 32
|
#define MAX_JOYSTICKS 32
|
||||||
|
|
||||||
struct nesGamePadMap_t
|
struct nesGamePadMap_t
|
||||||
{
|
{
|
||||||
char guid[64];
|
char guid[64];
|
||||||
char name[128];
|
char name[128];
|
||||||
char btn[GAMEPAD_NUM_BUTTONS][32];
|
char btn[GAMEPAD_NUM_BUTTONS][32];
|
||||||
char os[64];
|
char os[64];
|
||||||
|
|
||||||
nesGamePadMap_t(void);
|
nesGamePadMap_t(void);
|
||||||
~nesGamePadMap_t(void);
|
~nesGamePadMap_t(void);
|
||||||
|
|
||||||
void clearMapping(void);
|
void clearMapping(void);
|
||||||
int parseMapping( const char *text );
|
int parseMapping(const char *text);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct jsDev_t
|
struct jsDev_t
|
||||||
{
|
{
|
||||||
SDL_Joystick *js;
|
SDL_Joystick *js;
|
||||||
SDL_GameController *gc;
|
SDL_GameController *gc;
|
||||||
|
|
||||||
jsDev_t(void);
|
jsDev_t(void);
|
||||||
//~jsDev_t(void);
|
//~jsDev_t(void);
|
||||||
|
|
||||||
void init( int idx );
|
void init(int idx);
|
||||||
int close(void);
|
int close(void);
|
||||||
SDL_Joystick *getJS(void);
|
SDL_Joystick *getJS(void);
|
||||||
bool isGameController(void);
|
bool isGameController(void);
|
||||||
bool isConnected(void);
|
bool isConnected(void);
|
||||||
void print(void);
|
void print(void);
|
||||||
int bindPort( int idx );
|
int bindPort(int idx);
|
||||||
int unbindPort( int idx );
|
int unbindPort(int idx);
|
||||||
int getBindPorts(void);
|
int getBindPorts(void);
|
||||||
const char *getName(void);
|
const char *getName(void);
|
||||||
const char *getGUID(void);
|
const char *getGUID(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int devIdx;
|
int devIdx;
|
||||||
int portBindMask;
|
int portBindMask;
|
||||||
std::string guidStr;
|
std::string guidStr;
|
||||||
std::string name;
|
std::string name;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GamePad_t
|
class GamePad_t
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ButtConfig bmap[GAMEPAD_NUM_BUTTONS];
|
ButtConfig bmap[GAMEPAD_NUM_BUTTONS];
|
||||||
|
|
||||||
GamePad_t(void);
|
GamePad_t(void);
|
||||||
~GamePad_t(void);
|
~GamePad_t(void);
|
||||||
|
|
||||||
int init( int port, const char *guid, const char *profile = NULL );
|
int init(int port, const char *guid, const char *profile = NULL);
|
||||||
const char *getGUID(void);
|
const char *getGUID(void);
|
||||||
|
|
||||||
int loadDefaults(void);
|
int loadDefaults(void);
|
||||||
int loadProfile( const char *name, const char *guid = NULL );
|
int loadProfile(const char *name, const char *guid = NULL);
|
||||||
|
|
||||||
int getDeviceIndex(void){ return devIdx; }
|
int getDeviceIndex(void) { return devIdx; }
|
||||||
int setDeviceIndex( int devIdx );
|
int setDeviceIndex(int devIdx);
|
||||||
int setMapping( const char *map );
|
int setMapping(const char *map);
|
||||||
int setMapping( nesGamePadMap_t *map );
|
int setMapping(nesGamePadMap_t *map);
|
||||||
|
|
||||||
int createProfile( const char *name );
|
int createProfile(const char *name);
|
||||||
int getMapFromFile( const char *filename, char *out );
|
int getMapFromFile(const char *filename, char *out);
|
||||||
int getDefaultMap( char *out, const char *guid = NULL );
|
int getDefaultMap(char *out, const char *guid = NULL);
|
||||||
int saveMappingToFile( const char *filename, const char *txtMap );
|
int saveMappingToFile(const char *filename, const char *txtMap);
|
||||||
int saveCurrentMapToFile( const char *filename );
|
int saveCurrentMapToFile(const char *filename);
|
||||||
int deleteMapping( const char *name );
|
int deleteMapping(const char *name);
|
||||||
|
|
||||||
private:
|
|
||||||
int devIdx;
|
|
||||||
int portNum;
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
int devIdx;
|
||||||
|
int portNum;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GamePad_t GamePad[4];
|
extern GamePad_t GamePad[4];
|
||||||
|
|
||||||
jsDev_t *getJoystickDevice( int devNum );
|
jsDev_t *getJoystickDevice(int devNum);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue