git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34885 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
3c79166764
commit
946e44f786
|
@ -12,6 +12,9 @@ November 2, 2009 Wei Mingzhi <weimingzhi@gmail.com>
|
|||
* macosx/plugins/CDDeviceInterface/src/PlugCD.c: Likewise.
|
||||
* macosx/plugins/HIDInput/src/PSEmu_Plugin_Defs.h: Removed.
|
||||
* macosx/plugins/CDDeviceInterface/src/PSEmu_Plugin_Defs.h: Removed.
|
||||
* macosx/PcsxController.m: Don't allow starting game when Preferences dialog
|
||||
box is opened. Don't allow opening the Preferences dialog when game is
|
||||
running.
|
||||
|
||||
November 1, 2009 Wei Mingzhi <weimingzhi@gmail.com>
|
||||
|
||||
|
|
|
@ -61,12 +61,12 @@
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
|
||||
[[self window] center];
|
||||
|
||||
|
||||
// setup checkboxes
|
||||
checkBoxDefaults = [[NSMutableDictionary alloc] init];
|
||||
|
||||
|
||||
// check that the outlets are active before adding them
|
||||
if (noXaAudioCell) [checkBoxDefaults setObject:noXaAudioCell forKey:@"NoXaAudio"];
|
||||
if (sioIrqAlwaysCell) [checkBoxDefaults setObject:sioIrqAlwaysCell forKey:@"SioIrqAlways"];
|
||||
|
@ -81,7 +81,7 @@
|
|||
if (rCountFixCell) [checkBoxDefaults setObject:rCountFixCell forKey:@"RootCounterFix"];
|
||||
if (vSyncWAFixCell) [checkBoxDefaults setObject:vSyncWAFixCell forKey:@"VideoSyncWAFix"];
|
||||
if (noFastBootCell) [checkBoxDefaults setObject:noFastBootCell forKey:@"NoFastBoot"];
|
||||
|
||||
|
||||
// make the visuals match the defaults
|
||||
NSEnumerator *enumerator= [checkBoxDefaults keyEnumerator];
|
||||
id key;
|
||||
|
@ -90,14 +90,14 @@
|
|||
[[checkBoxDefaults objectForKey:key] setNextState];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// special cases
|
||||
if (![PcsxController biosAvailable]) {
|
||||
// no bios means always use HLE
|
||||
[usesHleCell setState:NSOnState];
|
||||
[usesHleCell setEnabled:NO];
|
||||
}
|
||||
|
||||
|
||||
int tag = [defaults integerForKey:@"AutoDetectVideoType"];
|
||||
if (tag)
|
||||
tag = 3;
|
||||
|
@ -110,10 +110,10 @@
|
|||
} else {
|
||||
[vTypePALCell selectItemAtIndex:[vTypePALCell indexOfItemWithTag:tag]];
|
||||
}
|
||||
|
||||
|
||||
// setup plugin lists
|
||||
PluginList *list = [PluginList list];
|
||||
|
||||
|
||||
[list refreshPlugins];
|
||||
[graphicsPlugin setPluginsTo:[list pluginsForType:PSE_LT_GPU] withType: PSE_LT_GPU];
|
||||
[soundPlugin setPluginsTo:[list pluginsForType:PSE_LT_SPU] withType: PSE_LT_SPU];
|
||||
|
@ -124,7 +124,6 @@
|
|||
- (void)dealloc
|
||||
{
|
||||
[checkBoxDefaults release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
2BA44360052DB2EA00E21DDD /* PcsxPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PcsxPlugin.h; sourceTree = "<group>"; };
|
||||
2BA44361052DB2EA00E21DDD /* PcsxPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = PcsxPlugin.m; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
|
||||
2BB3D6CF05427FE200831ACB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
2BB3D6D105427FE200831ACB /* PCSX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PCSX.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2BB3D6D105427FE200831ACB /* PCSX.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = PCSX.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2BBB1126051DC00500B84448 /* PluginList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginList.h; sourceTree = "<group>"; };
|
||||
2BBB1127051DC00500B84448 /* PluginList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PluginList.m; sourceTree = "<group>"; };
|
||||
2BBB1787051E0D9700B84448 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = Credits.rtf; sourceTree = "<group>"; };
|
||||
|
|
|
@ -19,7 +19,7 @@ NSString *saveStatePath;
|
|||
NSMutableString *deviceName;
|
||||
NSTask *ejectTask;
|
||||
NSRange rdiskRange;
|
||||
|
||||
|
||||
BOOL wasPaused = [EmuThread pauseSafe];
|
||||
|
||||
/* close connection to current cd */
|
||||
|
@ -92,7 +92,7 @@ NSString *saveStatePath;
|
|||
}
|
||||
preferenceWindow = [preferencesController window];
|
||||
}
|
||||
|
||||
|
||||
/* show the window */
|
||||
[preferenceWindow makeKeyAndOrderFront:self];
|
||||
[preferencesController showWindow:self];
|
||||
|
@ -157,8 +157,14 @@ NSString *saveStatePath;
|
|||
[menuItem action] == @selector(fullscreen:))
|
||||
return [EmuThread active];
|
||||
|
||||
if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:))
|
||||
return ![EmuThread active];
|
||||
if ([menuItem action] == @selector(runCD:) || [menuItem action] == @selector(runIso:)) {
|
||||
if (preferenceWindow != nil) {
|
||||
if ([preferenceWindow isVisible]) {
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
return ![EmuThread active];
|
||||
}
|
||||
|
||||
if ([menuItem action] == @selector(defrost:)) {
|
||||
if (![EmuThread active])
|
||||
|
@ -167,7 +173,13 @@ NSString *saveStatePath;
|
|||
NSString *path = [NSString stringWithFormat:@"%@/%s-%3.3d.pcsxstate", saveStatePath, CdromId, [menuItem tag]];
|
||||
return (CheckState((char *)[path fileSystemRepresentation]) == 0);
|
||||
}
|
||||
|
||||
|
||||
if ([menuItem action] == @selector(preferences:)) {
|
||||
if ([EmuThread active])
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#import "PluginController.h"
|
||||
#import "PcsxPlugin.h"
|
||||
#import "PcsxController.h"
|
||||
|
||||
@implementation PluginController
|
||||
|
||||
|
@ -22,14 +23,14 @@
|
|||
int index = [pluginMenu indexOfSelectedItem];
|
||||
if (index != -1) {
|
||||
PcsxPlugin *plugin = [plugins objectAtIndex:index];
|
||||
|
||||
|
||||
if (![[PluginList list] setActivePlugin:plugin forType:pluginType]) {
|
||||
/* plugin won't initialize */
|
||||
/* plugin won't initialize */
|
||||
}
|
||||
|
||||
|
||||
// write selection to defaults
|
||||
[[NSUserDefaults standardUserDefaults] setObject:[plugin path] forKey:defaultKey];
|
||||
|
||||
|
||||
// set button states
|
||||
[aboutButton setEnabled:[plugin hasAboutAs:pluginType]];
|
||||
[configureButton setEnabled:[plugin hasConfigureAs:pluginType]];
|
||||
|
@ -61,7 +62,7 @@
|
|||
// add the menu entries
|
||||
for (i=0; i<[plugins count]; i++) {
|
||||
[pluginMenu addItemWithTitle:[[plugins objectAtIndex:i] description]];
|
||||
|
||||
|
||||
// make sure the currently selected is set as such
|
||||
if ([sel isEqualToString:[[plugins objectAtIndex:i] path]]) {
|
||||
[pluginMenu selectItemAtIndex:i];
|
||||
|
|
Loading…
Reference in New Issue
Block a user