From ec03001040a634987b658e4b79e377ec4fd2e959 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 20 Dec 2012 22:42:36 +0000 Subject: Add a recent menu. Ignoring Xcode 4 generated files. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81905 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrController.m | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'macosx/PcsxrController.m') diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index f23d7dfd..da5de3d3 100644 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -195,9 +195,9 @@ static NSString *HandleBinCue(NSString *toHandle) [openDlg setAllowedFileTypes:[PcsxrDiscHandler supportedUTIs]]; if ([openDlg runModal] == NSFileHandlingPanelOKButton) { - NSArray* urls = [openDlg URLs]; - SetIsoFile((const char *)[HandleBinCue([[urls objectAtIndex:0] path]) fileSystemRepresentation]); - [EmuThread run]; + NSURL *url = [[openDlg URLs] objectAtIndex:0]; + [recentItems addRecentItem:url]; + [self runURL:url]; } [openDlg release]; } @@ -208,6 +208,12 @@ static NSString *HandleBinCue(NSString *toHandle) [EmuThread runBios]; } +- (void)runURL:(NSURL*)url +{ + SetIsoFile((const char *)[HandleBinCue([url path]) fileSystemRepresentation]); + [EmuThread run]; +} + - (IBAction)freeze:(id)sender { NSInteger num = [sender tag]; -- cgit v1.2.3