summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-04-02 18:01:28 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-04-02 18:01:28 +0000
commitebc8e55d33f011d9c44a5c76f463c99950f0e973 (patch)
tree715e11e8bff5125725a1600efbf3a4912b958a82
parent761714b617e99eaa5009ccf73e637367c41e3bb2 (diff)
downloadpcsxr-ebc8e55d33f011d9c44a5c76f463c99950f0e973.tar.gz
OS X:
Stop the memory card images from animating when the preferences window closes. Other changes and improvements. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89782 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rwxr-xr-xmacosx/ConfigurationController.h6
-rwxr-xr-xmacosx/ConfigurationController.m104
-rwxr-xr-xmacosx/EmuThread.m2
-rw-r--r--macosx/Pcsxr.xcodeproj/project.pbxproj19
-rwxr-xr-xmacosx/PcsxrFileHandle.h2
-rw-r--r--macosx/PcsxrMemCardArray.h14
-rw-r--r--macosx/PcsxrMemCardArray.m12
-rwxr-xr-xmacosx/PcsxrMemCardController.h6
-rwxr-xr-xmacosx/PcsxrMemCardController.m27
-rwxr-xr-xmacosx/PcsxrMemoryObject.h7
-rwxr-xr-xmacosx/PcsxrMemoryObject.m9
-rw-r--r--macosx/Resources/Base.lproj/CheatWindow.xib2
-rw-r--r--macosx/Resources/Base.lproj/Configuration.xib32
-rwxr-xr-xmacosx/hotkeys.m1
-rwxr-xr-xmacosx/main.m4
-rwxr-xr-xmacosx/plugins/DFInput/macsrc/MappingCell.h2
-rw-r--r--macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib13
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindow.h10
-rwxr-xr-xmacosx/plugins/PeopsXgl/macsrc/PluginWindow.m17
19 files changed, 144 insertions, 145 deletions
diff --git a/macosx/ConfigurationController.h b/macosx/ConfigurationController.h
index b3e5e471..4406a7a2 100755
--- a/macosx/ConfigurationController.h
+++ b/macosx/ConfigurationController.h
@@ -10,7 +10,7 @@ extern NSString *const memCardChangeNumberKey;
@class PcsxrMemCardController;
-@interface ConfigurationController : NSWindowController
+@interface ConfigurationController : NSWindowController <NSWindowDelegate, NSTabViewDelegate>
{
IBOutlet PluginController *cdromPlugin;
IBOutlet PluginController *graphicsPlugin;
@@ -49,8 +49,8 @@ extern NSString *const memCardChangeNumberKey;
+ (void)setMemoryCard:(NSInteger)theCard toPath:(NSString *)theFile;
+ (void)setMemoryCard:(NSInteger)theCard toURL:(NSURL *)theURL;
-+ (void)mcdNewClicked:(id)sender;
-+ (void)mcdChangeClicked:(id)sender;
+- (IBAction)mcdNewClicked:(id)sender;
+- (IBAction)mcdChangeClicked:(id)sender;
- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m
index ab887d69..aef8f7f4 100755
--- a/macosx/ConfigurationController.m
+++ b/macosx/ConfigurationController.m
@@ -78,7 +78,7 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
}
}
-+ (void)mcdChangeClicked:(id)sender
+- (IBAction)mcdChangeClicked:(id)sender
{
NSInteger tag = [sender tag];
char *mcd;
@@ -91,21 +91,21 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
mcd = Config.Mcd2;
}
- [openDlg setAllowedFileTypes:[PcsxrMemCardHandler supportedUTIs]];
-
path = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:mcd length:strlen(mcd)];
-
+
+ [openDlg setAllowedFileTypes:[PcsxrMemCardHandler supportedUTIs]];
[openDlg setDirectoryURL:[NSURL fileURLWithPath:[path stringByDeletingLastPathComponent] isDirectory:YES]];
[openDlg setNameFieldStringValue:[path lastPathComponent]];
-
- if ([openDlg runModal] == NSFileHandlingPanelOKButton) {
- NSURL *mcdURL = [openDlg URLs][0];
-
- [ConfigurationController setMemoryCard:tag toURL:mcdURL];
- }
+ [openDlg beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
+ if (result == NSFileHandlingPanelOKButton) {
+ NSURL *mcdURL = [openDlg URLs][0];
+
+ [ConfigurationController setMemoryCard:tag toURL:mcdURL];
+ }
+ }];
}
-+ (void)mcdNewClicked:(id)sender
+- (IBAction)mcdNewClicked:(id)sender
{
NSInteger tag = [sender tag];
char *mcd;
@@ -124,15 +124,24 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
[openDlg setNameFieldStringValue:NSLocalizedString(@"New Memory Card.mcd", nil)];
[openDlg setAllowedFileTypes:[PcsxrMemCardHandler supportedUTIs]];
- if ([openDlg runModal] == NSFileHandlingPanelOKButton) {
- NSURL *mcdURL = [openDlg URL];
-
- //Workaround/kludge to make sure we create a memory card before posting a notification
- strlcpy(mcd, [[mcdURL path] fileSystemRepresentation], MAXPATHLEN);
- CreateMcd(mcd);
-
- [ConfigurationController setMemoryCard:tag toURL:mcdURL];
- }
+ [openDlg beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) {
+ if (result == NSFileHandlingPanelOKButton) {
+ NSURL *mcdURL = [openDlg URL];
+ const char *fileSysRep;
+
+ if ([mcdURL respondsToSelector:@selector(fileSystemRepresentation)]) {
+ fileSysRep = [mcdURL fileSystemRepresentation];
+ } else {
+ fileSysRep = [[mcdURL path] fileSystemRepresentation];
+ }
+
+ //Workaround/kludge to make sure we create a memory card before posting a notification
+ strlcpy(mcd, fileSysRep, MAXPATHLEN);
+ CreateMcd(mcd);
+
+ [ConfigurationController setMemoryCard:tag toURL:mcdURL];
+ }
+ }];
}
- (IBAction)setVideoType:(id)sender
@@ -160,6 +169,16 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
}
}
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [memCardEdit stopMemoryAnimation];
+}
+
+- (void)windowDidBecomeMain:(NSNotification *)notification
+{
+ [memCardEdit beginMemoryAnimation];
+}
+
- (void)awakeFromNib
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
@@ -170,21 +189,36 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey";
self.checkBoxDefaults = [[NSMutableDictionary alloc] init];
// check that the outlets are active before adding them
- if (noXaAudioCell) _checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell;
- if (enableNetPlayCell) _checkBoxDefaults[@"NetPlay"] = enableNetPlayCell;
- if (sioIrqAlwaysCell) _checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell;
- if (bwMdecCell) _checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell;
- if (autoVTypeCell) _checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell;
- if (vTypePALCell) _checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell;
- if (noCDAudioCell) _checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell;
- if (usesHleCell) _checkBoxDefaults[@"UseHLE"] = usesHleCell;
- if (usesDynarecCell) _checkBoxDefaults[@"NoDynarec"] = usesDynarecCell;
- if (consoleOutputCell) _checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell;
- if (spuIrqAlwaysCell) _checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell;
- if (rCountFixCell) _checkBoxDefaults[@"RootCounterFix"] = rCountFixCell;
- if (vSyncWAFixCell) _checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell;
- if (noFastBootCell) _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell;
- if (widescreen) _checkBoxDefaults[@"Widescreen"] = widescreen;
+ if (noXaAudioCell)
+ _checkBoxDefaults[@"NoXaAudio"] = noXaAudioCell;
+ if (enableNetPlayCell)
+ _checkBoxDefaults[@"NetPlay"] = enableNetPlayCell;
+ if (sioIrqAlwaysCell)
+ _checkBoxDefaults[@"SioIrqAlways"] = sioIrqAlwaysCell;
+ if (bwMdecCell)
+ _checkBoxDefaults[@"BlackAndWhiteMDECVideo"] = bwMdecCell;
+ if (autoVTypeCell)
+ _checkBoxDefaults[@"AutoDetectVideoType"] = autoVTypeCell;
+ if (vTypePALCell)
+ _checkBoxDefaults[@"VideoTypePAL"] = vTypePALCell;
+ if (noCDAudioCell)
+ _checkBoxDefaults[@"NoCDAudio"] = noCDAudioCell;
+ if (usesHleCell)
+ _checkBoxDefaults[@"UseHLE"] = usesHleCell;
+ if (usesDynarecCell)
+ _checkBoxDefaults[@"NoDynarec"] = usesDynarecCell;
+ if (consoleOutputCell)
+ _checkBoxDefaults[@"ConsoleOutput"] = consoleOutputCell;
+ if (spuIrqAlwaysCell)
+ _checkBoxDefaults[@"SpuIrqAlways"] = spuIrqAlwaysCell;
+ if (rCountFixCell)
+ _checkBoxDefaults[@"RootCounterFix"] = rCountFixCell;
+ if (vSyncWAFixCell)
+ _checkBoxDefaults[@"VideoSyncWAFix"] = vSyncWAFixCell;
+ if (noFastBootCell)
+ _checkBoxDefaults[@"NoFastBoot"] = noFastBootCell;
+ if (widescreen)
+ _checkBoxDefaults[@"Widescreen"] = widescreen;
// make the visuals match the defaults
diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m
index f116d4c3..f4404c8e 100755
--- a/macosx/EmuThread.m
+++ b/macosx/EmuThread.m
@@ -7,7 +7,7 @@
//
#import <ExceptionHandling/NSExceptionHandler.h>
-#import <AppKit/NSApplication.h>
+#import <Cocoa/Cocoa.h>
#include <pthread.h>
#include <setjmp.h>
#import "EmuThread.h"
diff --git a/macosx/Pcsxr.xcodeproj/project.pbxproj b/macosx/Pcsxr.xcodeproj/project.pbxproj
index 38aff13b..cbb9dd7c 100644
--- a/macosx/Pcsxr.xcodeproj/project.pbxproj
+++ b/macosx/Pcsxr.xcodeproj/project.pbxproj
@@ -2893,7 +2893,6 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Pcsxr-QL/Pcsxr-QL-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
INFOPLIST_FILE = "Pcsxr-QL/Pcsxr-QL-Info.plist";
INSTALL_PATH = /Library/QuickLook;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2953,7 +2952,6 @@
"PCSXRPLUG=Bladesio1",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
WRAPPER_EXTENSION = psxplugin;
@@ -2985,7 +2983,6 @@
"PCSXRPLUG=DFCdrom",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
WRAPPER_EXTENSION = psxplugin;
@@ -3019,7 +3016,6 @@
"PCSXRPLUG=DFInput",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
HEADER_SEARCH_PATHS = (
/Library/Frameworks/SDL2.framework/Headers,
@@ -3064,7 +3060,6 @@
_DARWIN,
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)";
@@ -3105,7 +3100,6 @@
USESDL,
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
HEADER_SEARCH_PATHS = (
/Library/Frameworks/SDL2.framework/Headers,
@@ -3204,7 +3198,6 @@
USEOPENAL,
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INFOPLIST_FILE = "plugins/DFSound/Resorces/OpenAL/Info-AL.plist";
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
@@ -3244,7 +3237,6 @@
_DARWIN,
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
OTHER_CFLAGS = "$(OPTIMIZATION_CFLAGS)";
@@ -3282,7 +3274,6 @@
"PCSXRPLUG=DFNet",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins";
WRAPPER_EXTENSION = psxplugin;
@@ -3379,11 +3370,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@@ -3404,7 +3397,6 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = PCSXR;
CLANG_ENABLE_MODULES = NO;
- GCC_ENABLE_ASM_KEYWORD = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRCORE=1",
@@ -3414,7 +3406,6 @@
"ENABLE_SIO1API=1",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plistvers.plist;
OTHER_CFLAGS = "$(inherited)";
@@ -3603,7 +3594,6 @@
CLANG_ENABLE_MODULES = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEBUG_PREPROCESSOR_DEFINITIONS = "$(inherited) EMU_LOG=__Log";
- GCC_ENABLE_ASM_KEYWORD = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRCORE=1",
@@ -3613,7 +3603,6 @@
"ENABLE_SIO1API=1",
"$(inherited)",
);
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_UNKNOWN_PRAGMAS = NO;
INFOPLIST_FILE = Info.plist;
OTHER_CFLAGS = "$(inherited)";
@@ -3628,7 +3617,6 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = PCSXR;
CLANG_ENABLE_MODULES = NO;
- GCC_ENABLE_ASM_KEYWORD = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"PCSXRCORE=1",
@@ -3658,11 +3646,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@@ -3687,6 +3677,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
diff --git a/macosx/PcsxrFileHandle.h b/macosx/PcsxrFileHandle.h
index f3467a67..6c663fae 100755
--- a/macosx/PcsxrFileHandle.h
+++ b/macosx/PcsxrFileHandle.h
@@ -9,8 +9,6 @@
#import <Foundation/Foundation.h>
@protocol PcsxrFileHandle <NSObject>
-
+ (NSArray *)supportedUTIs;
- (BOOL)handleFile:(NSString *)theFile;
-
@end
diff --git a/macosx/PcsxrMemCardArray.h b/macosx/PcsxrMemCardArray.h
index 82098262..21b45f3c 100644
--- a/macosx/PcsxrMemCardArray.h
+++ b/macosx/PcsxrMemCardArray.h
@@ -15,9 +15,19 @@
- (void)deleteMemoryBlocksAtIndex:(int)slotnum;
- (void)compactMemory;
-//Blocks that are free
+
+/**
+ * @fn freeBlocks
+ * @abstract Blocks that are free from any data
+ * @result free blocks
+ */
- (int)freeBlocks;
-//Blocks that have been deleted and are free
+
+/**
+ * @fn availableBlocks
+ * @abstract Blocks that have been deleted
+ * @result free blocks
+ */
- (int)availableBlocks;
- (int)memorySizeAtIndex:(int)idx;
- (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard;
diff --git a/macosx/PcsxrMemCardArray.m b/macosx/PcsxrMemCardArray.m
index 58f2ec4a..3570b74c 100644
--- a/macosx/PcsxrMemCardArray.m
+++ b/macosx/PcsxrMemCardArray.m
@@ -44,7 +44,7 @@ static inline char* BlankHeader()
toReturn->nextBlock = 0xFFFF;
unsigned char *bytePtr = (unsigned char*)toReturn;
for (int i = 0; i < sizeof(struct PSXMemHeader) - sizeof(unsigned char); i++) {
- toReturn->checksum = toReturn->checksum ^ bytePtr[i];
+ toReturn->checksum ^= bytePtr[i];
}
}
@@ -127,7 +127,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
}
i += x;
}
- self.rawArray = [NSArray arrayWithArray:tmpMemArray];
+ self.rawArray = [[NSArray alloc] initWithArray:tmpMemArray];
}
return self;
}
@@ -210,7 +210,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
- (int)freeBlocks
{
- int memSize = 15;
+ int memSize = MAX_MEMCARD_BLOCKS;
for (PcsxrMemoryObject *memObj in rawArray) {
memSize -= memObj.blockSize;
}
@@ -234,7 +234,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
if (freeSize) {
McdBlock theBlock;
- //Create a blank "block" that will be used for
+ //Create a blank "block" that will be used to show the amount of free blocks
theBlock.Flags = 0xA0;
theBlock.IconCount = 0;
PcsxrMemoryObject *freeObj = [[PcsxrMemoryObject alloc] initWithMcdBlock:&theBlock startingIndex:MAX_MEMCARD_BLOCKS - 1 - freeSize size:freeSize];
@@ -256,7 +256,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
{
if (idx == [rawArray count]) {
#ifdef DEBUG
- NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"count\" the free blocks.");
+ NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"count\" the free blocks?");
#endif
return [self freeBlocks];
}
@@ -313,7 +313,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
if (slotnum == [rawArray count]) {
#ifdef DEBUG
- NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"delete\" the free blocks.");
+ NSLog(@"Trying to get an object one more than the length of the raw array. Perhaps you were trying to \"delete\" the free blocks?");
#endif
return;
}
diff --git a/macosx/PcsxrMemCardController.h b/macosx/PcsxrMemCardController.h
index bf5bfacf..d4a71088 100755
--- a/macosx/PcsxrMemCardController.h
+++ b/macosx/PcsxrMemCardController.h
@@ -22,7 +22,9 @@
- (IBAction)moveBlock:(id)sender;
- (IBAction)formatCard:(id)sender;
- (IBAction)deleteMemoryObject:(id)sender;
-- (IBAction)newMemCard:(id)sender;
-- (IBAction)changeMemCard:(id)sender;
- (void)loadMemoryCardInfoForCard:(int)theCard;
+
+- (void)beginMemoryAnimation;
+- (void)stopMemoryAnimation;
+
@end
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m
index 0620fbf4..7fb139ea 100755
--- a/macosx/PcsxrMemCardController.m
+++ b/macosx/PcsxrMemCardController.m
@@ -25,6 +25,20 @@
@synthesize memCard1Array;
@synthesize memCard2Array;
+- (void)stopMemoryAnimation
+{
+ [self.imageAnimateTimer invalidate];
+ self.imageAnimateTimer = nil;
+}
+
+- (void)beginMemoryAnimation
+{
+ if (!_imageAnimateTimer) {
+ self.imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate date] interval:0.30 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES];
+ [[NSRunLoop mainRunLoop] addTimer:self.imageAnimateTimer forMode:NSRunLoopCommonModes];
+ }
+}
+
- (void)setupValues:(int)theCards
{
NSParameterAssert(theCards < 4 && theCards > 0);
@@ -84,8 +98,7 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil];
- self.imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate date] interval:3.0/10.0 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES];
- [[NSRunLoop mainRunLoop] addTimer:self.imageAnimateTimer forMode:NSRunLoopCommonModes];
+ [self beginMemoryAnimation];
}
- (void)animateMemCards:(NSTimer*)theTimer
@@ -216,16 +229,6 @@
}
}
-- (IBAction)changeMemCard:(id)sender
-{
- [ConfigurationController mcdChangeClicked:sender];
-}
-
-- (IBAction)newMemCard:(id)sender
-{
- [ConfigurationController mcdNewClicked:sender];
-}
-
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/macosx/PcsxrMemoryObject.h b/macosx/PcsxrMemoryObject.h
index 08e59f28..94b5bd30 100755
--- a/macosx/PcsxrMemoryObject.h
+++ b/macosx/PcsxrMemoryObject.h
@@ -6,14 +6,9 @@
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
-#import <Foundation/NSObject.h>
+#import <Cocoa/Cocoa.h>
#include "sio.h"
-@class NSImage;
-@class NSString;
-@class NSArray;
-@class NSAttributedString;
-
extern NSString *const memoryAnimateTimerKey;
typedef enum _PCSXRMemFlags {
diff --git a/macosx/PcsxrMemoryObject.m b/macosx/PcsxrMemoryObject.m
index a54cc7a5..55753914 100755
--- a/macosx/PcsxrMemoryObject.m
+++ b/macosx/PcsxrMemoryObject.m
@@ -6,13 +6,8 @@
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
+#import <Cocoa/Cocoa.h>
#import "PcsxrMemoryObject.h"
-#import <Foundation/NSString.h>
-#import <Foundation/NSArray.h>
-#import <AppKit/NSColor.h>
-#import <AppKit/NSImage.h>
-#import <AppKit/NSBezierPath.h>
-#import <AppKit/NSAttributedString.h>
NSString *const memoryAnimateTimerKey = @"PCSXR Memory Card Image Animate";
@@ -225,7 +220,7 @@ static NSString *MemLabelEndLink;
return [PcsxrMemoryObject memoryLabelFromFlag:flagNameIndex];
}
-NS_INLINE void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr)
+static inline void SetupAttrStr(NSMutableAttributedString *mutStr, NSColor *txtclr)
{
NSRange wholeStrRange = NSMakeRange(0, mutStr.string.length);
[mutStr addAttribute:NSFontAttributeName value:[NSFont userFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]] range:wholeStrRange];
diff --git a/macosx/Resources/Base.lproj/CheatWindow.xib b/macosx/Resources/Base.lproj/CheatWindow.xib
index 2fbd6c0d..3e45c1fb 100644
--- a/macosx/Resources/Base.lproj/CheatWindow.xib
+++ b/macosx/Resources/Base.lproj/CheatWindow.xib
@@ -17,7 +17,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
- <window title="Cheats" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="1">
+ <window title="Cheats" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="documentWindow" id="1">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="153" width="698" height="357"/>
diff --git a/macosx/Resources/Base.lproj/Configuration.xib b/macosx/Resources/Base.lproj/Configuration.xib
index 6329b618..087b18fe 100644
--- a/macosx/Resources/Base.lproj/Configuration.xib
+++ b/macosx/Resources/Base.lproj/Configuration.xib
@@ -292,7 +292,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="262">
- <rect key="frame" x="76.000000543188094" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="600">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -314,7 +314,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="368">
- <rect key="frame" x="11" y="36" width="153.00000054318809" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="Graphics Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="370" id="601">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -356,7 +356,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="292">
- <rect key="frame" x="76.000000242143869" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="603">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -378,7 +378,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="371">
- <rect key="frame" x="11" y="36" width="153.00000024214387" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="Sound Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="373" id="604">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -421,7 +421,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="301">
- <rect key="frame" x="76.000000242143869" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="605">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -443,7 +443,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="374">
- <rect key="frame" x="11" y="36" width="153.00000024214387" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="Controller Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="376" id="607">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -486,7 +486,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="297">
- <rect key="frame" x="76.000000242143869" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="609">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -508,7 +508,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" tag="3" translatesAutoresizingMaskIntoConstraints="NO" id="377">
- <rect key="frame" x="11" y="36" width="153.00000024214387" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="CDROM Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="379" id="610">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -550,7 +550,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="625">
- <rect key="frame" x="76.000000242143869" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="626">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -572,7 +572,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="623">
- <rect key="frame" x="11" y="36" width="153.00000024214387" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="Net Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="630" id="628">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -614,7 +614,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="903">
- <rect key="frame" x="76.000000242143869" y="7" width="90" height="28"/>
+ <rect key="frame" x="76" y="7" width="90" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Configure…" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="910">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -636,7 +636,7 @@
</connections>
</button>
<popUpButton verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="905">
- <rect key="frame" x="11" y="36" width="153.00000024214387" height="26"/>
+ <rect key="frame" x="11" y="36" width="153" height="26"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<popUpButtonCell key="cell" type="push" title="Net Plugin" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingMiddle" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="908" id="906">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
@@ -840,7 +840,7 @@
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
- <action selector="newMemCard:" target="955" id="1011"/>
+ <action selector="mcdNewClicked:" target="-2" id="XdX-Ob-zgs"/>
</connections>
</button>
<button verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="931">
@@ -851,7 +851,7 @@
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
- <action selector="changeMemCard:" target="955" id="1005"/>
+ <action selector="mcdChangeClicked:" target="-2" id="dNz-eu-YMu"/>
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="932">
@@ -871,7 +871,7 @@
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
- <action selector="newMemCard:" target="955" id="1010"/>
+ <action selector="mcdNewClicked:" target="-2" id="2fL-p3-QJe"/>
</connections>
</button>
<button verticalHuggingPriority="750" tag="2" translatesAutoresizingMaskIntoConstraints="NO" id="934">
@@ -882,7 +882,7 @@
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
- <action selector="changeMemCard:" target="955" id="1012"/>
+ <action selector="mcdChangeClicked:" target="-2" id="3id-0Y-3BS"/>
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="935">
diff --git a/macosx/hotkeys.m b/macosx/hotkeys.m
index 16a5d50c..497c1c53 100755
--- a/macosx/hotkeys.m
+++ b/macosx/hotkeys.m
@@ -7,7 +7,6 @@
//
#import <Cocoa/Cocoa.h>
-#import <AppKit/AppKit.h>
#import "hotkeys.h"
#import "EmuThread.h"
#include "plugins.h"
diff --git a/macosx/main.m b/macosx/main.m
index ab98a87d..d8c2e14c 100755
--- a/macosx/main.m
+++ b/macosx/main.m
@@ -114,7 +114,7 @@ int SysInit()
if (![logFolderURL checkResourceIsReachableAndReturnError:NULL])
[manager createDirectoryAtPath:[logFolderURL path] withIntermediateDirectories:YES attributes:nil error:NULL];
//We use the log extension so that OS X's console app can open it by default.
- NSURL *logFileURL = [logFolderURL URLByAppendingPathComponent:@"emuLog.log"];
+ NSURL *logFileURL = [logFolderURL URLByAppendingPathComponent:@"PCSX-R emuLog.log"];
emuLog = fopen([[logFileURL path] fileSystemRepresentation], "wb");
#else
@@ -154,8 +154,8 @@ void SysReset()
static void AddStringToLogList(NSString *themsg)
{
static NSMutableString *theStr;
- NSRange newlineRange, fullLineRange;
static dispatch_once_t onceToken;
+ NSRange newlineRange, fullLineRange;
dispatch_once(&onceToken, ^{
theStr = [[NSMutableString alloc] init];
});
diff --git a/macosx/plugins/DFInput/macsrc/MappingCell.h b/macosx/plugins/DFInput/macsrc/MappingCell.h
index 58ebc7e1..d85100d3 100755
--- a/macosx/plugins/DFInput/macsrc/MappingCell.h
+++ b/macosx/plugins/DFInput/macsrc/MappingCell.h
@@ -21,7 +21,7 @@
#define MappingCell NetPcsxrHIDInputPluginMappingCell
-#import <AppKit/AppKit.h>
+#import <Cocoa/Cocoa.h>
@interface MappingCell : NSTextFieldCell
diff --git a/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib b/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib
index 5c73971b..f1b2cf3c 100644
--- a/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib
+++ b/macosx/plugins/PeopsXgl/NetSfPeopsOpenGLGPUInterface.xib
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
- <deployment defaultVersion="1070" identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
+ <deployment defaultVersion="1080" identifier="macosx"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5053"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NetSfPeopsSoftGPUPluginWindowController">
@@ -13,9 +13,8 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
- <window title="PeopsOpenGL Display" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window" customClass="NetSfPeopsOpenGLGPUPluginWindow">
- <windowStyleMask key="styleMask" titled="YES" closable="YES" resizable="YES"/>
- <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
+ <window title="PeopsOpenGL Display" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window" customClass="NetSfPeopsOpenGLGPUPluginWindow">
+ <windowStyleMask key="styleMask" closable="YES" resizable="YES"/>
<rect key="contentRect" x="108" y="331" width="640" height="480"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<value key="minSize" type="size" width="213" height="107"/>
@@ -34,4 +33,4 @@
</connections>
</window>
</objects>
-</document> \ No newline at end of file
+</document>
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
index ddeae10b..c2e232cb 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.h
@@ -18,7 +18,6 @@
/* this is a borderless window that can be dragged about. Also, holds a GLView */
#import <Cocoa/Cocoa.h>
-#import <AppKit/NSMenu.h>
@interface NetSfPeopsOpenGLGPUPluginWindow : NSWindow
{
@@ -26,12 +25,6 @@
NSPoint initialLocation;
}
-- (id) initWithContentRect: (NSRect) contentRect
- styleMask: (NSUInteger) aStyle
- backing: (NSBackingStoreType) bufferingType
- defer: (BOOL) flag ;
-
-
- (BOOL) canBecomeKeyWindow; // to stop the beeping
- (void) sendEvent:(NSEvent *)theEvent;
@@ -46,8 +39,5 @@
- (void)keyDown:(NSEvent *)theEvent;
- (void)keyUp:(NSEvent *)theEvent;
-@end
-
-@interface NetSfPeopsOpenGLGPUPluginWindow (NSMenuValidation)
- (BOOL)validateMenuItem:(NSMenuItem*) item;
@end
diff --git a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
index 8e202933..990495ec 100755
--- a/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
+++ b/macosx/plugins/PeopsXgl/macsrc/PluginWindow.m
@@ -42,22 +42,6 @@
[super sendEvent:theEvent];
}
-- (id) initWithContentRect: (NSRect) contentRect
- styleMask: (NSUInteger) aStyle
- backing: (NSBackingStoreType) bufferingType
- defer: (BOOL) flag
-{
- if (self = [super initWithContentRect: contentRect
- styleMask: NSBorderlessWindowMask
- backing: bufferingType
- defer: flag])
- {
- return self;
- }
-
- return nil;
-}
-
- (void) windowDidResize:(NSNotification*)notice
{
}
@@ -116,7 +100,6 @@
}
-
/*