mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
ios: Move core selection to after game selection. Click the disclosure button to access core settings. (A method to allow core suggestions will be added later)
This commit is contained in:
parent
b89208f7fb
commit
bd088a3332
@ -29,7 +29,6 @@
|
||||
_config = config;
|
||||
_list = ra_ios_list_directory(_path);
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [RetroArch_iOS get].settings_button;
|
||||
[self setTitle: [_path lastPathComponent]];
|
||||
|
||||
// Init collection view
|
||||
@ -61,7 +60,7 @@
|
||||
if(path.isDirectory)
|
||||
[[RetroArch_iOS get] pushViewController:[RADirectoryList directoryListOrGridWithPath:path.path] isGame:NO];
|
||||
else
|
||||
[[RetroArch_iOS get] runGame:path.path];
|
||||
[[RetroArch_iOS get] pushViewController:[[RAModuleList alloc] initWithGame:path.path] isGame:NO];
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
@ -45,7 +45,6 @@
|
||||
_config = config;
|
||||
_list = ra_ios_list_directory(_path);
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [RetroArch_iOS get].settings_button;
|
||||
[self setTitle: [_path lastPathComponent]];
|
||||
|
||||
return self;
|
||||
@ -58,7 +57,7 @@
|
||||
if(path.isDirectory)
|
||||
[[RetroArch_iOS get] pushViewController:[RADirectoryList directoryListOrGridWithPath:path.path] isGame:NO];
|
||||
else
|
||||
[[RetroArch_iOS get] runGame:path.path];
|
||||
[[RetroArch_iOS get] pushViewController:[[RAModuleList alloc] initWithGame:path.path] isGame:NO];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
|
@ -18,11 +18,13 @@
|
||||
@implementation RAModuleList
|
||||
{
|
||||
NSMutableArray* _modules;
|
||||
NSString* _game;
|
||||
}
|
||||
|
||||
- (id)init
|
||||
- (id)initWithGame:(NSString*)path
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStylePlain];
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
_game = path;
|
||||
|
||||
// Get the contents of the modules directory of the bundle.
|
||||
NSString* module_dir = [NSString stringWithFormat:@"%@/modules", [[NSBundle mainBundle] bundlePath]];
|
||||
@ -58,16 +60,14 @@
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
RAModuleInfo* info = (RAModuleInfo*)[_modules objectAtIndex:indexPath.row];
|
||||
[RetroArch_iOS get].moduleInfo = info;
|
||||
|
||||
[[RetroArch_iOS get] pushViewController:[RADirectoryList directoryListOrGridWithPath:nil] isGame:NO];
|
||||
[RetroArch_iOS get].moduleInfo = (RAModuleInfo*)[_modules objectAtIndex:indexPath.row];;
|
||||
[[RetroArch_iOS get] runGame:_game];
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
RAModuleInfo* info = (RAModuleInfo*)[_modules objectAtIndex:indexPath.row];
|
||||
[[RetroArch_iOS get] pushViewController:[[RAModuleInfoList alloc] initWithModuleInfo:info] isGame:NO];
|
||||
[RetroArch_iOS get].moduleInfo = (RAModuleInfo*)[_modules objectAtIndex:indexPath.row];
|
||||
[[RetroArch_iOS get] showSettings];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
@ -84,7 +84,6 @@
|
||||
cell.textLabel.text = [[info.path lastPathComponent] stringByDeletingPathExtension];
|
||||
cell.accessoryType = (info.data) ? UITableViewCellAccessoryDetailDisclosureButton : UITableViewCellAccessoryNone;
|
||||
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
@ -25,11 +25,13 @@
|
||||
- (void)pushViewController:(UIViewController*)theView isGame:(BOOL)game;
|
||||
- (UIViewController*)popViewController;
|
||||
|
||||
- (IBAction)showSettings;
|
||||
- (IBAction)showWiiRemoteConfig;
|
||||
|
||||
@property (strong, nonatomic) RAModuleInfo* moduleInfo;
|
||||
|
||||
@property (strong, nonatomic) NSString* system_directory;
|
||||
@property (strong, nonatomic) UIImage* file_icon;
|
||||
@property (strong, nonatomic) UIImage* folder_icon;
|
||||
@property (strong, nonatomic) UIBarButtonItem* settings_button;
|
||||
|
||||
@end
|
||||
|
@ -16,6 +16,13 @@
|
||||
#include <sys/stat.h>
|
||||
#include "rarch_wrapper.h"
|
||||
#include "general.h"
|
||||
#import "browser.h"
|
||||
|
||||
#ifdef WIIMOTE
|
||||
#include "BTStack/wiimote.h"
|
||||
#import "BTStack/WiiMoteHelper.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define ALMOST_INVISIBLE .021f
|
||||
|
||||
@ -99,14 +106,6 @@
|
||||
self.file_icon = [UIImage imageNamed:@"ic_file"];
|
||||
self.folder_icon = [UIImage imageNamed:@"ic_dir"];
|
||||
|
||||
// Load buttons
|
||||
self.settings_button = [[UIBarButtonItem alloc]
|
||||
initWithTitle:@"Module Settings"
|
||||
style:UIBarButtonItemStyleBordered
|
||||
target:nil action:nil];
|
||||
self.settings_button.target = self;
|
||||
self.settings_button.action = @selector(showSettings);
|
||||
|
||||
// Load pause menu
|
||||
UINib* xib = [UINib nibWithNibName:@"PauseView" bundle:nil];
|
||||
_pauseView = [[xib instantiateWithOwner:self options:nil] lastObject];
|
||||
@ -119,7 +118,7 @@
|
||||
|
||||
// Setup window
|
||||
_navigator = [[RANavigator alloc] initWithAppDelegate:self];
|
||||
[_navigator pushViewController: [RAModuleList new] animated:YES];
|
||||
[_navigator pushViewController: [RADirectoryList directoryListOrGridWithPath:nil] animated:YES];
|
||||
|
||||
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
_window.rootViewController = _navigator;
|
||||
@ -351,6 +350,12 @@
|
||||
[self pushViewController:[RASettingsList new] isGame:NO];
|
||||
}
|
||||
|
||||
- (IBAction)showWiiRemoteConfig
|
||||
{
|
||||
#ifdef WIIMOTE
|
||||
[WiiMoteHelper startwiimote:_navigator];
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
@ -16,11 +16,6 @@
|
||||
#import <objc/runtime.h>
|
||||
#import "settings.h"
|
||||
|
||||
#ifdef WIIMOTE
|
||||
#include "BTStack/wiimote.h"
|
||||
#import "BTStack/WiiMoteHelper.h"
|
||||
#endif
|
||||
|
||||
@implementation RASettingData
|
||||
@end
|
||||
|
||||
@ -190,10 +185,8 @@ static RASettingData* subpath_setting(RAConfig* config, NSString* name, NSString
|
||||
{
|
||||
if (indexPath.row == 0)
|
||||
[[RetroArch_iOS get] pushViewController:[[RAModuleInfoList alloc] initWithModuleInfo:[RetroArch_iOS get].moduleInfo] isGame:NO];
|
||||
#ifdef WIIMOTE
|
||||
else if(indexPath.row == 1)
|
||||
[WiiMoteHelper startwiimote:_navigator];
|
||||
#endif
|
||||
[[RetroArch_iOS get] showWiiRemoteConfig];
|
||||
}
|
||||
else
|
||||
[super tableView:tableView didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:indexPath.section - 1]];
|
||||
|
@ -34,6 +34,7 @@
|
||||
@end
|
||||
|
||||
@interface RAModuleList : UITableViewController
|
||||
- (id)initWithGame:(NSString*)path;
|
||||
@end
|
||||
|
||||
@interface RASettingsSubList : UITableViewController
|
||||
|
Loading…
x
Reference in New Issue
Block a user