From ebc8e55d33f011d9c44a5c76f463c99950f0e973 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 2 Apr 2014 18:01:28 +0000 Subject: 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 --- macosx/PcsxrMemCardArray.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'macosx/PcsxrMemCardArray.m') 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; } -- cgit v1.2.3