summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 12:23:10 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-11-02 12:23:10 +0000
commit946e44f786311b367a0f66de424e42330de7cbc0 (patch)
tree54d98dddc2bb9a4aea007b08c79ea7723a3e507d
parent3c791667648a61138c29f8fec56a38d9c343e97a (diff)
downloadpcsxr-946e44f786311b367a0f66de424e42330de7cbc0.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34885 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--ChangeLog3
-rw-r--r--macosx/ConfigurationController.m17
-rw-r--r--macosx/Pcsx.xcodeproj/project.pbxproj2
-rw-r--r--macosx/PcsxController.m22
-rw-r--r--macosx/PluginController.m11
5 files changed, 35 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ba36dc4..9c40108e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m
index d5e4cd8d..e62465e2 100644
--- a/macosx/ConfigurationController.m
+++ b/macosx/ConfigurationController.m
@@ -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];
}
diff --git a/macosx/Pcsx.xcodeproj/project.pbxproj b/macosx/Pcsx.xcodeproj/project.pbxproj
index 5d282123..71dd2a2a 100644
--- a/macosx/Pcsx.xcodeproj/project.pbxproj
+++ b/macosx/Pcsx.xcodeproj/project.pbxproj
@@ -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>"; };
diff --git a/macosx/PcsxController.m b/macosx/PcsxController.m
index 3d12ee66..4ff909b7 100644
--- a/macosx/PcsxController.m
+++ b/macosx/PcsxController.m
@@ -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;
}
diff --git a/macosx/PluginController.m b/macosx/PluginController.m
index a77f8850..1b4d1e79 100644
--- a/macosx/PluginController.m
+++ b/macosx/PluginController.m
@@ -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];