2016-04-13 19:43:16 +00:00
|
|
|
#ifndef GBButtons_h
|
|
|
|
#define GBButtons_h
|
|
|
|
|
|
|
|
typedef enum : NSUInteger {
|
|
|
|
GBRight,
|
|
|
|
GBLeft,
|
|
|
|
GBUp,
|
|
|
|
GBDown,
|
|
|
|
GBA,
|
|
|
|
GBB,
|
|
|
|
GBSelect,
|
|
|
|
GBStart,
|
|
|
|
GBTurbo,
|
2018-02-10 12:42:14 +00:00
|
|
|
GBRewind,
|
2018-02-10 21:30:30 +00:00
|
|
|
GBUnderclock,
|
2018-12-04 22:00:16 +00:00
|
|
|
GBButtonCount,
|
|
|
|
GBGameBoyButtonCount = GBStart + 1,
|
2016-04-13 19:43:16 +00:00
|
|
|
} GBButton;
|
|
|
|
|
|
|
|
extern NSString const *GBButtonNames[GBButtonCount];
|
|
|
|
|
2018-12-04 22:00:16 +00:00
|
|
|
static inline NSString *button_to_preference_name(GBButton button, unsigned player)
|
2016-04-13 19:43:16 +00:00
|
|
|
{
|
2018-12-04 22:00:16 +00:00
|
|
|
if (player) {
|
|
|
|
return [NSString stringWithFormat:@"GBPlayer%d%@", player + 1, GBButtonNames[button]];
|
|
|
|
}
|
2016-04-13 19:43:16 +00:00
|
|
|
return [NSString stringWithFormat:@"GB%@", GBButtonNames[button]];
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|