mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(iOS) You can now remove keyboard or joystick button assignments.
This commit is contained in:
parent
2e4846cb43
commit
0c2261aa01
@ -94,7 +94,7 @@ static const struct
|
||||
message:_value.label
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Cancel"
|
||||
otherButtonTitles:nil];
|
||||
otherButtonTitles:@"Clear Keyboard", @"Clear Joystick", nil];
|
||||
[_alert show];
|
||||
|
||||
_btTimer = [NSTimer scheduledTimerWithTimeInterval:.05f target:self selector:@selector(checkInput) userInfo:nil repeats:YES];
|
||||
@ -109,7 +109,7 @@ static const struct
|
||||
|
||||
[_btTimer invalidate];
|
||||
|
||||
[_alert dismissWithClickedButtonIndex:0 animated:YES];
|
||||
[_alert dismissWithClickedButtonIndex:_alert.cancelButtonIndex animated:YES];
|
||||
[_view reloadData];
|
||||
|
||||
_me = nil;
|
||||
@ -118,6 +118,11 @@ static const struct
|
||||
|
||||
- (void)alertView:(UIAlertView*)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
if (buttonIndex == _alert.firstOtherButtonIndex)
|
||||
_value.msubValues[0] = @"";
|
||||
else if(buttonIndex == _alert.firstOtherButtonIndex + 1)
|
||||
_value.msubValues[1] = @"";
|
||||
|
||||
[self finish];
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,9 @@ static const char* const SETTINGID = "SETTING";
|
||||
break;
|
||||
|
||||
case ButtonSetting:
|
||||
if (setting.msubValues[0] && [setting.msubValues[0] length])
|
||||
if (setting.msubValues[0])
|
||||
config_set_string(config, [setting.name UTF8String], [setting.msubValues[0] UTF8String]);
|
||||
if (setting.msubValues[1] && [setting.msubValues[1] length])
|
||||
if (setting.msubValues[1])
|
||||
config_set_string(config, [[setting.name stringByAppendingString:@"_btn"] UTF8String], [setting.msubValues[1] UTF8String]);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user