mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
(iOS) Various:
Re-add default config generation code, if a config file didn't exist it would not be possible to change settings while running. Sort emulator core list. Add .info files for more emulators.
This commit is contained in:
parent
e9497abc61
commit
debf31b7a4
@ -114,6 +114,8 @@
|
|||||||
- (void)runGame:(NSString*)path
|
- (void)runGame:(NSString*)path
|
||||||
{
|
{
|
||||||
assert(self.moduleInfo);
|
assert(self.moduleInfo);
|
||||||
|
|
||||||
|
[RASettingsList refreshConfigFile];
|
||||||
|
|
||||||
const char* const sd = [[RetroArch_iOS get].system_directory UTF8String];
|
const char* const sd = [[RetroArch_iOS get].system_directory UTF8String];
|
||||||
const char* const cf = (ra_ios_is_file(self.moduleInfo.configPath)) ? [self.moduleInfo.configPath UTF8String] : 0;
|
const char* const cf = (ra_ios_is_file(self.moduleInfo.configPath)) ? [self.moduleInfo.configPath UTF8String] : 0;
|
||||||
|
@ -60,7 +60,18 @@
|
|||||||
else
|
else
|
||||||
[_other addObject:module];
|
[_other addObject:module];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort
|
||||||
|
[_supported sortUsingComparator:^(RAModuleInfo* left, RAModuleInfo* right)
|
||||||
|
{
|
||||||
|
return [left.displayName caseInsensitiveCompare:right.displayName];
|
||||||
|
}];
|
||||||
|
|
||||||
|
[_other sortUsingComparator:^(RAModuleInfo* left, RAModuleInfo* right)
|
||||||
|
{
|
||||||
|
return [left.displayName caseInsensitiveCompare:right.displayName];
|
||||||
|
}];
|
||||||
|
|
||||||
[self setTitle:[_game lastPathComponent]];
|
[self setTitle:[_game lastPathComponent]];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,11 @@ static RASettingData* custom_action(NSString* action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
@implementation RASettingsList
|
@implementation RASettingsList
|
||||||
|
+ (void)refreshConfigFile
|
||||||
|
{
|
||||||
|
(void)[[RASettingsList alloc] init];
|
||||||
|
}
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
|
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
|
||||||
@ -123,9 +128,9 @@ static RASettingData* custom_action(NSString* action)
|
|||||||
[NSArray arrayWithObjects:@"Video",
|
[NSArray arrayWithObjects:@"Video",
|
||||||
boolean_setting(config, @"video_smooth", @"Smooth Video", @"true"),
|
boolean_setting(config, @"video_smooth", @"Smooth Video", @"true"),
|
||||||
boolean_setting(config, @"video_crop_overscan", @"Crop Overscan", @"true"),
|
boolean_setting(config, @"video_crop_overscan", @"Crop Overscan", @"true"),
|
||||||
subpath_setting(config, @"video_bsnes_shader", @"Shader", @"", shader_path, @"shader"),
|
|
||||||
aspect_setting(config, @"Aspect Ratio"),
|
|
||||||
boolean_setting(config, @"video_scale_integer", @"Integer Scaling", @"false"),
|
boolean_setting(config, @"video_scale_integer", @"Integer Scaling", @"false"),
|
||||||
|
aspect_setting(config, @"Aspect Ratio"),
|
||||||
|
subpath_setting(config, @"video_bsnes_shader", @"Shader", @"", shader_path, @"shader"),
|
||||||
nil],
|
nil],
|
||||||
|
|
||||||
[NSArray arrayWithObjects:@"Audio",
|
[NSArray arrayWithObjects:@"Audio",
|
||||||
@ -191,6 +196,7 @@ static RASettingData* custom_action(NSString* action)
|
|||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
|
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
|
||||||
|
[config putStringNamed:@"system_directory" value:[RetroArch_iOS get].system_directory];
|
||||||
[self writeSettings:nil toConfig:config];
|
[self writeSettings:nil toConfig:config];
|
||||||
[config writeToFile:[RetroArch_iOS get].moduleInfo.configPath];
|
[config writeToFile:[RetroArch_iOS get].moduleInfo.configPath];
|
||||||
[[RetroArch_iOS get] refreshConfig];
|
[[RetroArch_iOS get] refreshConfig];
|
||||||
|
@ -162,6 +162,7 @@ static const char* const SETTINGID = "SETTING";
|
|||||||
{
|
{
|
||||||
cell = [self.tableView dequeueReusableCellWithIdentifier:@"enumeration"];
|
cell = [self.tableView dequeueReusableCellWithIdentifier:@"enumeration"];
|
||||||
cell = cell ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"enumeration"];
|
cell = cell ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"enumeration"];
|
||||||
|
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -48,4 +48,5 @@ enum SettingTypes
|
|||||||
@end
|
@end
|
||||||
|
|
||||||
@interface RASettingsList : RASettingsSubList
|
@interface RASettingsList : RASettingsSubList
|
||||||
|
+ (void)refreshConfigFile;
|
||||||
@end
|
@end
|
||||||
|
6
ios/modules/mednafen_ngp_libretro.info
Normal file
6
ios/modules/mednafen_ngp_libretro.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
display_name = "Neo Geo Pocket (Color)"
|
||||||
|
supported_extensions = "ngp|ngc"
|
||||||
|
emuname = "Mednafen Neopop"
|
||||||
|
manufacturer = "SNK"
|
||||||
|
systemname = "Neo Geo Pocket (Color)"
|
||||||
|
|
6
ios/modules/mednafen_pce_fast_libretro.info
Normal file
6
ios/modules/mednafen_pce_fast_libretro.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
display_name = "PC Engine/TurboGrafx-16"
|
||||||
|
supported_extensions = "pce|sgx|cue"
|
||||||
|
emuname = "Mednafen PCE Fast"
|
||||||
|
manufacturer = "NEC"
|
||||||
|
systemname = "PC Engine/TurboGrafx-16"
|
||||||
|
|
6
ios/modules/mednafen_psx_libretro.info
Normal file
6
ios/modules/mednafen_psx_libretro.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
display_name = "PlayStation"
|
||||||
|
supported_extensions = "cue|toc"
|
||||||
|
emuname = "Mednafen PSX"
|
||||||
|
manufacturer = "Sony"
|
||||||
|
systemname = "PlayStation"
|
||||||
|
|
6
ios/modules/mednafen_vb_libretro.info
Normal file
6
ios/modules/mednafen_vb_libretro.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
display_name = "Virtual Boy"
|
||||||
|
supported_extensions = "vb|vboy|bin"
|
||||||
|
emuname = "Mednafen VB"
|
||||||
|
manufacturer = "Nintendo"
|
||||||
|
systemname = "Virtual Boy"
|
||||||
|
|
6
ios/modules/mednafen_wswan_libretro.info
Normal file
6
ios/modules/mednafen_wswan_libretro.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
display_name = "WonderSwan (Color)"
|
||||||
|
supported_extensions = "ws|wsc"
|
||||||
|
emuname = "Mednafen WonderSwan"
|
||||||
|
manufacturer = "Bandai"
|
||||||
|
systemname = "WonderSwan (Color)"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user