Link Enable NetPlay button to the proper action.
Open dialogs now have a set file types that they can open (Set by UTIs, with a new imported UTI for disc images). Retaining openDlg, then releasing when done, as per the suggestion of Apple's documentation. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72823 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
e46e672bf9
commit
4273fdfc90
|
@ -40,6 +40,7 @@
|
|||
char *mcd;
|
||||
NSTextField *label;
|
||||
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
|
||||
[openDlg retain];
|
||||
NSString *path;
|
||||
|
||||
if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; }
|
||||
|
@ -47,6 +48,7 @@
|
|||
|
||||
[openDlg setCanChooseFiles:YES];
|
||||
[openDlg setCanChooseDirectories:NO];
|
||||
[openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.memcard"]];
|
||||
|
||||
path = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:mcd length:strlen(mcd)];
|
||||
|
||||
|
@ -65,6 +67,7 @@
|
|||
else
|
||||
[[NSUserDefaults standardUserDefaults] setObject:mcdPath forKey:@"Mcd2"];
|
||||
}
|
||||
[openDlg release];
|
||||
}
|
||||
|
||||
- (IBAction)mcdNewClicked:(id)sender
|
||||
|
@ -73,6 +76,7 @@
|
|||
char *mcd;
|
||||
NSTextField *label;
|
||||
NSSavePanel *openDlg = [NSSavePanel savePanel];
|
||||
[openDlg retain];
|
||||
NSString *path;
|
||||
|
||||
if (tag == 1) { mcd = Config.Mcd1; label = mcd1Label; }
|
||||
|
@ -82,6 +86,7 @@
|
|||
|
||||
[openDlg setDirectoryURL:[NSURL fileURLWithPath:[path stringByDeletingLastPathComponent]]];
|
||||
[openDlg setNameFieldStringValue:@"New Memory Card File.mcr"];
|
||||
[openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.memcard"]];
|
||||
|
||||
if ([openDlg runModal] == NSFileHandlingPanelOKButton) {
|
||||
NSString *mcdPath = [[openDlg URL] path];
|
||||
|
@ -96,6 +101,7 @@
|
|||
|
||||
CreateMcd(mcd);
|
||||
}
|
||||
[openDlg release];
|
||||
}
|
||||
|
||||
- (IBAction)setVideoType:(id)sender
|
||||
|
|
|
@ -562,7 +562,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
<string key="NSFrame">{{18, 16}, {232, 40}}</string>
|
||||
<reference key="NSSuperview" ref="584348218"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="145760790"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<int key="NSNumRows">2</int>
|
||||
<int key="NSNumCols">1</int>
|
||||
|
@ -1946,14 +1946,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
</object>
|
||||
<int key="connectionID">621</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">enableNetPlayCell</string>
|
||||
<reference key="source" ref="974938689"/>
|
||||
<reference key="destination" ref="322742106"/>
|
||||
</object>
|
||||
<int key="connectionID">641</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">mcdEditClicked:</string>
|
||||
|
@ -1962,6 +1954,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
</object>
|
||||
<int key="connectionID">644</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">setCheckbox:</string>
|
||||
<reference key="source" ref="974938689"/>
|
||||
<reference key="destination" ref="322742106"/>
|
||||
</object>
|
||||
<int key="connectionID">650</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">enableNetPlayCell</string>
|
||||
<reference key="source" ref="974938689"/>
|
||||
<reference key="destination" ref="322742106"/>
|
||||
</object>
|
||||
<int key="connectionID">651</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
|
@ -3134,7 +3142,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">644</int>
|
||||
<int key="maxID">651</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
|
@ -3291,68 +3299,43 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
|
|||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">PluginController</string>
|
||||
<string key="superclassName">NSWindowController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="cancel:">id</string>
|
||||
<string key="ok:">id</string>
|
||||
<string key="reset:">id</string>
|
||||
<string key="doAbout:">id</string>
|
||||
<string key="doConfigure:">id</string>
|
||||
<string key="selectPlugin:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="cancel:">
|
||||
<string key="name">cancel:</string>
|
||||
<object class="IBActionInfo" key="doAbout:">
|
||||
<string key="name">doAbout:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="ok:">
|
||||
<string key="name">ok:</string>
|
||||
<object class="IBActionInfo" key="doConfigure:">
|
||||
<string key="name">doConfigure:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="reset:">
|
||||
<string key="name">reset:</string>
|
||||
<object class="IBActionInfo" key="selectPlugin:">
|
||||
<string key="name">selectPlugin:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="hiCompBox">NSControl</string>
|
||||
<string key="interpolValue">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
<string key="irqWaitBox">NSControl</string>
|
||||
<string key="monoSoundBox">NSControl</string>
|
||||
<string key="reverbValue">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
<string key="volumeValue">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
<string key="xaEnableBox">NSControl</string>
|
||||
<string key="xaSpeedBox">NSControl</string>
|
||||
<string key="aboutButton">NSButton</string>
|
||||
<string key="configureButton">NSButton</string>
|
||||
<string key="pluginMenu">NSPopUpButton</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="hiCompBox">
|
||||
<string key="name">hiCompBox</string>
|
||||
<string key="candidateClassName">NSControl</string>
|
||||
<object class="IBToOneOutletInfo" key="aboutButton">
|
||||
<string key="name">aboutButton</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="interpolValue">
|
||||
<string key="name">interpolValue</string>
|
||||
<string key="candidateClassName">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
<object class="IBToOneOutletInfo" key="configureButton">
|
||||
<string key="name">configureButton</string>
|
||||
<string key="candidateClassName">NSButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="irqWaitBox">
|
||||
<string key="name">irqWaitBox</string>
|
||||
<string key="candidateClassName">NSControl</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="monoSoundBox">
|
||||
<string key="name">monoSoundBox</string>
|
||||
<string key="candidateClassName">NSControl</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="reverbValue">
|
||||
<string key="name">reverbValue</string>
|
||||
<string key="candidateClassName">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="volumeValue">
|
||||
<string key="name">volumeValue</string>
|
||||
<string key="candidateClassName">NetSfPeopsSPUPluginNamedSlider</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="xaEnableBox">
|
||||
<string key="name">xaEnableBox</string>
|
||||
<string key="candidateClassName">NSControl</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="xaSpeedBox">
|
||||
<string key="name">xaSpeedBox</string>
|
||||
<string key="candidateClassName">NSControl</string>
|
||||
<object class="IBToOneOutletInfo" key="pluginMenu">
|
||||
<string key="name">pluginMenu</string>
|
||||
<string key="candidateClassName">NSPopUpButton</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
|
|
|
@ -215,5 +215,30 @@
|
|||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.disk-image</string>
|
||||
<string>public.content</string>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>PlayStation Disc</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.codeplex.pcsxr.psxdiscfile</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>bin</string>
|
||||
<string>img</string>
|
||||
<string>mdf</string>
|
||||
<string>iso</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -29,15 +29,18 @@ NSString *saveStatePath;
|
|||
// switch to another ISO if using internal image reader, otherwise eject the CD
|
||||
if (UsingIso()) {
|
||||
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
|
||||
[openDlg retain];
|
||||
|
||||
[openDlg setCanChooseFiles:YES];
|
||||
[openDlg setCanChooseDirectories:NO];
|
||||
[openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.psxdiscfile"]];
|
||||
|
||||
if ([openDlg runModal] == NSFileHandlingPanelOKButton) {
|
||||
NSArray* files = [openDlg filenames];
|
||||
NSArray* files = [openDlg URLs];
|
||||
SetCdOpenCaseTime(time(NULL) + 2);
|
||||
SetIsoFile((const char *)[[files objectAtIndex:0] fileSystemRepresentation]);
|
||||
SetIsoFile((const char *)[[[files objectAtIndex:0] path] fileSystemRepresentation]);
|
||||
}
|
||||
[openDlg release];
|
||||
} else {
|
||||
char *driveLetter = CDR_getDriveLetter();
|
||||
|
||||
|
@ -106,15 +109,18 @@ NSString *saveStatePath;
|
|||
- (IBAction)runIso:(id)sender
|
||||
{
|
||||
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
|
||||
[openDlg retain];
|
||||
|
||||
[openDlg setCanChooseFiles:YES];
|
||||
[openDlg setCanChooseDirectories:NO];
|
||||
[openDlg setAllowedFileTypes:[NSArray arrayWithObject:@"com.codeplex.pcsxr.psxdiscfile"]];
|
||||
|
||||
if ([openDlg runModal] == NSFileHandlingPanelOKButton) {
|
||||
NSArray* urls = [openDlg URLs];
|
||||
SetIsoFile((const char *)[[[urls objectAtIndex:0] path] fileSystemRepresentation]);
|
||||
[EmuThread run];
|
||||
}
|
||||
[openDlg release];
|
||||
}
|
||||
|
||||
- (IBAction)runBios:(id)sender
|
||||
|
|
Loading…
Reference in New Issue
Block a user