Prevent screensaver when using a joypad
This commit is contained in:
parent
f3c07f1f99
commit
aeb9f0eda4
@ -216,6 +216,7 @@
|
|||||||
|
|
||||||
- (void) joystick:(NSString *)joystick_name button: (unsigned)button changedState: (bool) state
|
- (void) joystick:(NSString *)joystick_name button: (unsigned)button changedState: (bool) state
|
||||||
{
|
{
|
||||||
|
UpdateSystemActivity(UsrActivity);
|
||||||
NSDictionary *mapping = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"GBJoypadMappings"][joystick_name];
|
NSDictionary *mapping = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"GBJoypadMappings"][joystick_name];
|
||||||
|
|
||||||
for (GBButton i = 0; i < GBButtonCount; i++) {
|
for (GBButton i = 0; i < GBButtonCount; i++) {
|
||||||
@ -239,6 +240,7 @@
|
|||||||
|
|
||||||
- (void) joystick:(NSString *)joystick_name axis: (unsigned)axis movedTo: (signed) value
|
- (void) joystick:(NSString *)joystick_name axis: (unsigned)axis movedTo: (signed) value
|
||||||
{
|
{
|
||||||
|
UpdateSystemActivity(UsrActivity);
|
||||||
NSDictionary *mapping = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"GBJoypadMappings"][joystick_name];
|
NSDictionary *mapping = [[NSUserDefaults standardUserDefaults] dictionaryForKey:@"GBJoypadMappings"][joystick_name];
|
||||||
NSNumber *x_axis = [mapping objectForKey:@"XAxis"];
|
NSNumber *x_axis = [mapping objectForKey:@"XAxis"];
|
||||||
NSNumber *y_axis = [mapping objectForKey:@"YAxis"];
|
NSNumber *y_axis = [mapping objectForKey:@"YAxis"];
|
||||||
|
Loading…
Reference in New Issue
Block a user