diff options
| author | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-11 12:08:23 +0000 |
|---|---|---|
| committer | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-11 12:08:23 +0000 |
| commit | ea7338ddf9678665f8f59948225077d24afa3a93 (patch) | |
| tree | 0ef83c175639a63c08a48a5eac928c5fbf78d11a | |
| parent | 3c5463799445020fd0fe7ae8a4c9e604d8e5ad15 (diff) | |
| download | pcsxr-ea7338ddf9678665f8f59948225077d24afa3a93.tar.gz | |
10797, 10798 (MaddTheSane).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72170 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | macosx/EmuThread.h | 1 | ||||
| -rw-r--r-- | macosx/EmuThread.m | 13 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginGLView.m | 16 |
3 files changed, 14 insertions, 16 deletions
diff --git a/macosx/EmuThread.h b/macosx/EmuThread.h index e307bc5e..decb5870 100644 --- a/macosx/EmuThread.h +++ b/macosx/EmuThread.h @@ -10,7 +10,6 @@ #include <setjmp.h> @interface EmuThread : NSObject { - NSAutoreleasePool *pool; jmp_buf restartJmp; BOOL wasPaused; } diff --git a/macosx/EmuThread.m b/macosx/EmuThread.m index 384e542b..0b47e514 100644 --- a/macosx/EmuThread.m +++ b/macosx/EmuThread.m @@ -33,7 +33,7 @@ static pthread_mutex_t eventMutex; - (void)EmuThreadRun:(id)anObject
{
- pool = [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(emuWindowDidClose:)
@@ -76,7 +76,7 @@ static pthread_mutex_t eventMutex; psxCpu->Execute();
done:
- [pool release]; pool = nil;
+ [pool drain];
emuThread = nil;
return;
@@ -84,7 +84,7 @@ done: - (void)EmuThreadRunBios:(id)anObject
{
- pool = [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(emuWindowDidClose:)
@@ -110,7 +110,7 @@ done: psxCpu->Execute();
done:
- [pool release]; pool = nil;
+ [pool drain];
emuThread = nil;
return;
@@ -121,9 +121,6 @@ done: // remove all registered observers
[[NSNotificationCenter defaultCenter] removeObserver:self name:nil object:nil];
- if (pool)
- [pool release];
-
[super dealloc];
}
@@ -152,6 +149,7 @@ done: and we can just handle events next time round */
if (pthread_mutex_trylock(&eventMutex) == 0) {
while (safeEvent) {
+ NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (safeEvent & EMUEVENT_STOP) {
/* signify that the emulation has stopped */
[emuThread autorelease];
@@ -199,6 +197,7 @@ done: /* wait until we're signalled */
pthread_cond_wait(&eventCond, &eventMutex);
}
+ [pool drain];
}
pthread_mutex_unlock(&eventMutex);
}
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m index dc4e7dc4..6046fe79 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m @@ -527,7 +527,7 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) unsigned char * surf; long x = PSXDisplay.DisplayPosition.x; long y = PSXDisplay.DisplayPosition.y; - unsigned long lu; + GLuint lu; unsigned short row,column; unsigned short dx=(unsigned short)PSXDisplay.DisplayEnd.x;//PreviousPSXDisplay.Range.x1; unsigned short dy=(unsigned short)PSXDisplay.DisplayEnd.y;//PreviousPSXDisplay.DisplayMode.y; @@ -577,10 +577,10 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) for(;row<dx;row+=4) { - unsigned long lu1 = *((unsigned long *)pD); - unsigned long lu2 = *((unsigned long *)pD+1); - unsigned long lu3 = *((unsigned long *)pD+2); - unsigned long *dst = ((unsigned long *)((surf)+(column*lPitch)+(row<<2))); + GLuint lu1 = *((GLuint *)pD); + GLuint lu2 = *((GLuint *)pD+1); + GLuint lu3 = *((GLuint *)pD+2); + GLuint *dst = ((GLuint *)((surf)+(column*lPitch)+(row<<2))); #ifdef __BIG_ENDIAN__ *(dst)= (((lu1>>24)&0xff)<<16)|(((lu1>>16)&0xff)<<8)|(((lu1>>8)&0xff)); @@ -615,9 +615,9 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) else { int LineOffset,SurfOffset; - unsigned long * SRCPtr = (unsigned long *)(psxVuw + (y << 10) + x); - unsigned long * DSTPtr = - ((unsigned long *)surf) + (PreviousPSXDisplay.Range.x0 >> 1); + GLuint * SRCPtr = (GLuint *)(psxVuw + (y << 10) + x); + GLuint * DSTPtr = + ((GLuint *)surf) + (PreviousPSXDisplay.Range.x0 >> 1); dx >>= 1; |
