mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 06:18: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
|
||||
{
|
||||
assert(self.moduleInfo);
|
||||
|
||||
[RASettingsList refreshConfigFile];
|
||||
|
||||
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;
|
||||
|
@ -60,7 +60,18 @@
|
||||
else
|
||||
[_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]];
|
||||
return self;
|
||||
}
|
||||
|
@ -105,6 +105,11 @@ static RASettingData* custom_action(NSString* action)
|
||||
}
|
||||
|
||||
@implementation RASettingsList
|
||||
+ (void)refreshConfigFile
|
||||
{
|
||||
(void)[[RASettingsList alloc] init];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
RAConfig* config = [[RAConfig alloc] initWithPath:[RetroArch_iOS get].moduleInfo.configPath];
|
||||
@ -123,9 +128,9 @@ static RASettingData* custom_action(NSString* action)
|
||||
[NSArray arrayWithObjects:@"Video",
|
||||
boolean_setting(config, @"video_smooth", @"Smooth Video", @"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"),
|
||||
aspect_setting(config, @"Aspect Ratio"),
|
||||
subpath_setting(config, @"video_bsnes_shader", @"Shader", @"", shader_path, @"shader"),
|
||||
nil],
|
||||
|
||||
[NSArray arrayWithObjects:@"Audio",
|
||||
@ -191,6 +196,7 @@ static RASettingData* custom_action(NSString* action)
|
||||
- (void)dealloc
|
||||
{
|
||||
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];
|
||||
[config writeToFile:[RetroArch_iOS get].moduleInfo.configPath];
|
||||
[[RetroArch_iOS get] refreshConfig];
|
||||
|
@ -162,6 +162,7 @@ static const char* const SETTINGID = "SETTING";
|
||||
{
|
||||
cell = [self.tableView dequeueReusableCellWithIdentifier:@"enumeration"];
|
||||
cell = cell ? cell : [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"enumeration"];
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -48,4 +48,5 @@ enum SettingTypes
|
||||
@end
|
||||
|
||||
@interface RASettingsList : RASettingsSubList
|
||||
+ (void)refreshConfigFile;
|
||||
@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