summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-11-27 05:20:36 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-11-27 05:20:36 +0000
commit43a9632f4a6a4196ef33f45a8db7af4a08442da0 (patch)
tree2160a8cfa92d5397b00384b1e594e4ddc986583f
parent2aef6a6a05384c7eb5e01fc5144a893f5aeb853c (diff)
downloadpcsxr-43a9632f4a6a4196ef33f45a8db7af4a08442da0.tar.gz
Some more OS X refinement.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87984 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/Configs/Pcsxr-Release.xcconfig3
-rw-r--r--macosx/Configs/Pcsxr.xcconfig2
-rw-r--r--macosx/Pcsxr.xcodeproj/project.pbxproj16
-rwxr-xr-xmacosx/main.m23
4 files changed, 24 insertions, 20 deletions
diff --git a/macosx/Configs/Pcsxr-Release.xcconfig b/macosx/Configs/Pcsxr-Release.xcconfig
index 5837eb2c..819572a2 100644
--- a/macosx/Configs/Pcsxr-Release.xcconfig
+++ b/macosx/Configs/Pcsxr-Release.xcconfig
@@ -2,7 +2,7 @@ DEBUG_PREPROCESSOR_DEFINITIONS =
#include "Pcsxr.xcconfig"
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
-GCC_OPTIMIZATION_LEVEL = s
+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
@@ -15,3 +15,4 @@ 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/Configs/Pcsxr.xcconfig b/macosx/Configs/Pcsxr.xcconfig
index c5a8d0d8..77e4e6aa 100644
--- a/macosx/Configs/Pcsxr.xcconfig
+++ b/macosx/Configs/Pcsxr.xcconfig
@@ -11,7 +11,7 @@ SDKROOT = macosx
GCC_PREPROCESSOR_DEFINITIONS = _MACOSX=1 $(DEBUG_PREPROCESSOR_DEFINITIONS)
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
-MACOSX_DEPLOYMENT_TARGET = 10.9
+MACOSX_DEPLOYMENT_TARGET = 10.8
CLANG_ENABLE_OBJC_ARC = YES
GCC_DYNAMIC_NO_PIC = NO
COMBINE_HIDPI_IMAGES = YES
diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj
index 4968987f..a313dbae 100644
--- a/macosx/Pcsxr.xcodeproj/project.pbxproj
+++ b/macosx/Pcsxr.xcodeproj/project.pbxproj
@@ -2869,6 +2869,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_WARN_EMPTY_BODY = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_PREFIX = lib;
@@ -3044,6 +3045,7 @@
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_UNROLL_LOOPS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GENERATE_PKGINFO_FILE = NO;
MACOSX_DEPLOYMENT_TARGET = "";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3066,6 +3068,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "updateInfoPlist/updateInfoPlist-Prefix.pch";
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GENERATE_PKGINFO_FILE = NO;
MACOSX_DEPLOYMENT_TARGET = "";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3087,6 +3090,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "updateInfoPlist/updateInfoPlist-Prefix.pch";
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GENERATE_PKGINFO_FILE = NO;
MACOSX_DEPLOYMENT_TARGET = "";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3134,11 +3138,8 @@
);
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plistvers.plist;
- LD_NO_PIE = YES;
- OTHER_CFLAGS = (
- "-funroll-loops",
- "$(inherited)",
- );
+ LD_NO_PIE = NO;
+ OTHER_CFLAGS = "$(inherited)";
PRODUCT_NAME = PCSXR;
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = app;
@@ -3334,7 +3335,7 @@
);
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plistvers.plist;
- LD_NO_PIE = YES;
+ LD_NO_PIE = NO;
OTHER_CFLAGS = "$(inherited)";
PRODUCT_NAME = PCSXR;
SKIP_INSTALL = NO;
@@ -3358,9 +3359,8 @@
);
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plistvers.plist;
- LD_NO_PIE = YES;
+ LD_NO_PIE = NO;
OTHER_CFLAGS = (
- "-funroll-loops",
"-fomit-frame-pointer",
"$(inherited)",
);
diff --git a/macosx/main.m b/macosx/main.m
index bda97ec4..3858c588 100755
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -118,7 +118,7 @@ void SysReset()
//EmuReset();
}
-static void AddStringToLogList(const char *themsg)
+static void AddStringToLogList(NSString *themsg)
{
static NSMutableString *theStr;
NSRange newlineRange, fullLineRange;
@@ -126,7 +126,7 @@ static void AddStringToLogList(const char *themsg)
dispatch_once(&onceToken, ^{
theStr = [[NSMutableString alloc] init];
});
- [theStr appendString:@(themsg)];
+ [theStr appendString:themsg];
while ((newlineRange = [theStr rangeOfString:@"\n"]).location != NSNotFound) {
NSString *tmpStr = [theStr substringToIndex:newlineRange.location];
if (tmpStr && ![tmpStr isEqualToString:@""]) {
@@ -142,32 +142,29 @@ static void AddStringToLogList(const char *themsg)
void SysPrintf(const char *fmt, ...)
{
va_list list;
- char *msg = calloc(sizeof(char), 512);
+ NSString *msg;
va_start(list, fmt);
- vsnprintf(msg, 512, fmt, list);
+ msg = [[NSString alloc] initWithFormat:@(fmt) arguments:list];
va_end(list);
-
+
RunOnMainThreadSync(^{
if (Config.PsxOut)
AddStringToLogList(msg);
#ifdef EMU_LOG
#ifndef LOG_STDOUT
if (emuLog)
- fprintf(emuLog, "%s", msg);
+ fprintf(emuLog, "%s", [msg UTF8String]);
#endif
#endif
});
- free(msg);
}
void SysMessage(const char *fmt, ...)
{
va_list list;
- NSString *locFmtString = NSLocalizedString(@(fmt), nil);
-
va_start(list, fmt);
- NSString *msg = [[NSString alloc] initWithFormat:locFmtString arguments:list];
+ NSString *msg = [[NSString alloc] initWithFormat:@(fmt) arguments:list];
va_end(list);
NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: msg};
@@ -256,6 +253,12 @@ void SysClose()
//Tell the memory card manager that the memory cards changed.
//The number three tells the mem card manager to update both cards 1 and 2.
[[NSNotificationCenter defaultCenter] postNotificationName:memChangeNotifier object:nil userInfo:@{memCardChangeNumberKey: @3}];
+
+ //Clear the log list
+ RunOnMainThreadSync(^{
+ if (Config.PsxOut)
+ AddStringToLogList(@"\n");
+ });
}
void OnFile_Exit()