summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-03-28 21:47:05 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-03-28 21:47:05 +0000
commita92f831335493c2ed789a3f746861af49ef5e4c8 (patch)
tree7d423b62aa08268aa067e9d9c014d289c347e978
parentb7761528326a064c81aaba3ebc275b394b3e1283 (diff)
downloadpcsxr-a92f831335493c2ed789a3f746861af49ef5e4c8.tar.gz
OS X:
Tell PCSX-R to push the save state status text to the GUI after emulation resumes. Tweak the networking a small bit. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89708 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/Configs/Pcsxr-Release.xcconfig4
-rwxr-xr-xmacosx/EmuThread.m15
-rwxr-xr-xmacosx/PcsxrController.m5
-rwxr-xr-xmacosx/Plugin.c10
4 files changed, 16 insertions, 18 deletions
diff --git a/macosx/Configs/Pcsxr-Release.xcconfig b/macosx/Configs/Pcsxr-Release.xcconfig
index 819572a2..da7fa066 100644
--- a/macosx/Configs/Pcsxr-Release.xcconfig
+++ b/macosx/Configs/Pcsxr-Release.xcconfig
@@ -1,18 +1,14 @@
DEBUG_PREPROCESSOR_DEFINITIONS =
#include "Pcsxr.xcconfig"
-GCC_INLINES_ARE_PRIVATE_EXTERN = YES
GCC_OPTIMIZATION_LEVEL = 3
-GCC_UNROLL_LOOPS = YES
COPY_PHASE_STRIP = YES
OPTIMIZATION_CFLAGS = -finline-functions -fomit-frame-pointer -fno-exceptions -funroll-loops -ffast-math
STRIP_INSTALLED_PRODUCT = YES
DEAD_CODE_STRIPPING = YES
APPLY_RULES_IN_COPY_FILES = YES
-INFOPLIST_OUTPUT_FORMAT = binary
PLIST_FILE_OUTPUT_FORMAT = binary
STRINGS_FILE_OUTPUT_ENCODING = binary
CODE_SIGN_IDENTITY = PCSX-R Developer
LLVM_LTO = YES
-LLVM_VECTORIZE_LOOPS = YES
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m
index 3ddffdcb..f116d4c3 100755
--- a/macosx/EmuThread.m
+++ b/macosx/EmuThread.m
@@ -291,7 +291,8 @@ done:
return YES;
[EmuThread pause];
- while ([EmuThread isPaused] != 2) [NSThread sleepUntilDate:[[NSDate date] dateByAddingTimeInterval:0.05]];
+ while ([EmuThread isPaused] != 2)
+ [NSThread sleepUntilDate:[[NSDate date] dateByAddingTimeInterval:0.05]];
return NO;
}
@@ -361,17 +362,21 @@ done:
+ (void)freezeAt:(NSString *)path which:(int)num
{
[self pauseSafeWithBlock:^(BOOL emuWasPaused) {
+ int tmpNum = num;
char Text[256];
- GPU_freeze(2, (GPUFreeze_t *)&num);
+ GPU_freeze(2, (GPUFreeze_t *)&tmpNum);
int ret = SaveState([path fileSystemRepresentation]);
- if (ret == 0) sprintf (Text, _("*PCSXR*: Saved State %d"), num);
- else sprintf (Text, _("*PCSXR*: Error Saving State %d"), num);
- GPU_displayText(Text);
if (!emuWasPaused) {
[EmuThread resume];
}
+
+ if (ret == 0)
+ snprintf(Text, sizeof(Text), _("*PCSXR*: Saved State %d"), num);
+ else
+ snprintf(Text, sizeof(Text), _("*PCSXR*: Error Saving State %d"), num);
+ GPU_displayText(Text);
}];
}
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 51e29ce6..4bdce477 100755
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -877,6 +877,7 @@ otherblock();\
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
{
NSFileManager *fm = [NSFileManager defaultManager];
+ NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
if (skipFiles && [skipFiles count]) {
for (NSString *parsedFile in skipFiles) {
if ([filename isEqualToString:parsedFile]) {
@@ -942,7 +943,7 @@ otherblock();\
}
NSError *err = nil;
- NSString *utiFile = [[NSWorkspace sharedWorkspace] typeOfFile:filename error:&err];
+ NSString *utiFile = [workspace typeOfFile:filename error:&err];
if (err) {
NSRunAlertPanel(NSLocalizedString(@"Error opening file", nil), NSLocalizedString(@"Unable to open %@: %@", nil), nil, nil, nil, [filename lastPathComponent], err);
return NO;
@@ -956,7 +957,7 @@ otherblock();\
NSObject<PcsxrFileHandle> *hand = [[fileHandler alloc] init];
BOOL canHandle = NO;
for (NSString *uti in [fileHandler supportedUTIs]) {
- if ([[NSWorkspace sharedWorkspace] type:utiFile conformsToType:uti]) {
+ if ([workspace type:utiFile conformsToType:uti]) {
canHandle = YES;
break;
}
diff --git a/macosx/Plugin.c b/macosx/Plugin.c
index e5cc65d3..b9e7ff4a 100755
--- a/macosx/Plugin.c
+++ b/macosx/Plugin.c
@@ -47,8 +47,8 @@ void PADhandleKey(int key) {
#ifdef ENABLE_SIO1API
SIO1_keypressed(key);
#endif
- if (Config.UseNet) NET_keypressed(key);
-
+ if (Config.UseNet)
+ NET_keypressed(key);
}
long PAD1__open(void) {
@@ -64,8 +64,6 @@ void SignalExit(int sig) {
OnFile_Exit();
}
-void SPUirq(void);
-
#define PARSEPATH(dst, src) \
ptr = src + strlen(src); \
while (*ptr != '\\' && ptr != src) ptr--; \
@@ -103,7 +101,7 @@ int _OpenPlugins() {
netInfo info;
char path[MAXPATHLEN];
- strcpy(info.EmuName, "PCSX " PACKAGE_VERSION);
+ strcpy(info.EmuName, "PCSXR " PACKAGE_VERSION);
strncpy(info.CdromID, CdromId, 9);
strncpy(info.CdromLabel, CdromLabel, 11);
info.psxMem = psxM;
@@ -142,13 +140,11 @@ int _OpenPlugins() {
Config.UseNet = FALSE;
}
} else {
-
if (NET_queryPlayer() == 1) {
if (SendPcsxInfo() == -1) Config.UseNet = FALSE;
} else {
if (RecvPcsxInfo() == -1) Config.UseNet = FALSE;
}
-
}
NetOpened = TRUE;
} else if (Config.UseNet) {