Added screenshot feature
[clinton/Virtual-Jaguar-Rx.git] / src / gui / profile.h
CommitLineData
cf76e892
JPM
1#ifndef __PROFILE_H__
2#define __PROFILE_H__
3
4#include <stdint.h>
5
6class QComboBox;
7class QSettings;
8
9#define MAX_PROFILES 64 // 64 profiles ought to be enough for everybody
10#define CONTROLLER1 0x01
11#define CONTROLLER2 0x02
12
13
14struct Profile
15{
16 int device; // Host device number (-1 == invalid profile)
17 char mapName[32]; // Human readable map name
18 int preferredSlot; // CONTROLLER1 and/or CONTROLLER2
19 uint32_t map[21]; // Keys/buttons/axes
20};
21
22
23// Function prototypes
24void SaveProfiles(void);
25void RestoreProfiles(void);
26void ReadProfiles(QSettings *);
27void WriteProfiles(QSettings *);
28int GetFreeProfile(void);
29void DeleteProfile(int);
30int FindDeviceNumberForName(const char *);
31int FindMappingsForDevice(int, QComboBox *);
32int FindUsableProfiles(QComboBox *);
33bool ConnectProfileToController(int, int);
34void AutoConnectProfiles(void);
35
36
37// Exported variables
38extern Profile profile[];
39extern int controller1Profile;
40extern int controller2Profile;
41extern int gamepadIDSlot1;
42extern int gamepadIDSlot2;
43//extern int numberOfProfiles;
44
45#endif // __PROFILE_H__
46