diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-04-02 18:01:28 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-04-02 18:01:28 +0000 |
| commit | ebc8e55d33f011d9c44a5c76f463c99950f0e973 (patch) | |
| tree | 715e11e8bff5125725a1600efbf3a4912b958a82 /macosx/PcsxrMemCardArray.m | |
| parent | 761714b617e99eaa5009ccf73e637367c41e3bb2 (diff) | |
| download | pcsxr-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
Diffstat (limited to 'macosx/PcsxrMemCardArray.m')
| -rw-r--r-- | macosx/PcsxrMemCardArray.m | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |
