diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-10-10 00:04:58 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-10-10 00:04:58 +0000 |
| commit | 7a613cfccd715ef0b9daa7e49fee51349367b9c8 (patch) | |
| tree | 84fed251e91c6daf67727a0db5b8ff440b19b510 | |
| parent | 15882a2822759bf1d3856beaa1c37346f371b68c (diff) | |
| download | pcsxr-7a613cfccd715ef0b9daa7e49fee51349367b9c8.tar.gz | |
Mainly spacing changes, and a few OCD things.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@80323 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | macosx/PcsxrController.m | 23 | ||||
| -rw-r--r-- | macosx/config.h | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginConfigController.m | 23 | ||||
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginGLView.m | 24 |
4 files changed, 37 insertions, 35 deletions
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m index 72409f7e..66861ada 100644 --- a/macosx/PcsxrController.m +++ b/macosx/PcsxrController.m @@ -452,43 +452,48 @@ static NSString *HandleBinCue(NSString *toHandle) NSURL *supportURL = [manager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:NULL]; if(supportURL != nil) { + NSURL *PcsxrAppSupport; + NSURL *MemCardPath; NSURL *url; BOOL dir; + + PcsxrAppSupport = [supportURL URLByAppendingPathComponent:@"Pcsxr"]; // create them if needed - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Bios"]; + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Bios"]; if (![url checkResourceIsReachableAndReturnError:NULL]) [manager createDirectoryAtPath:[url path] withIntermediateDirectories:YES attributes:nil error:NULL]; - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards"]; + MemCardPath = [PcsxrAppSupport URLByAppendingPathComponent:@"Memory Cards"]; + url = MemCardPath; if (![url checkResourceIsReachableAndReturnError:NULL]) [manager createDirectoryAtPath:[url path] withIntermediateDirectories:YES attributes:nil error:NULL]; - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Patches"]; + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Patches"]; if (![url checkResourceIsReachableAndReturnError:NULL]) [manager createDirectoryAtPath:[url path] withIntermediateDirectories:YES attributes:nil error:NULL]; - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/PlugIns"]; + url = [PcsxrAppSupport URLByAppendingPathComponent:@"PlugIns"]; if (![url checkResourceIsReachableAndReturnError:NULL]) [manager createDirectoryAtPath:[url path] withIntermediateDirectories:YES attributes:nil error:NULL]; - saveStatePath = [[[supportURL URLByAppendingPathComponent:@"Pcsxr/Save States"] path] copy]; + saveStatePath = [[[PcsxrAppSupport URLByAppendingPathComponent:@"Save States"] path] copy]; if (![manager fileExistsAtPath:saveStatePath isDirectory:&dir]) [manager createDirectoryAtPath:saveStatePath withIntermediateDirectories:YES attributes:nil error:NULL]; - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd001.mcr"]; + url = [MemCardPath URLByAppendingPathComponent:@"Mcd001.mcr"]; str = [[url path] fileSystemRepresentation]; if (str != nil) strncpy(Config.Mcd1, str, MAXPATHLEN); - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd002.mcr"]; + url = [MemCardPath URLByAppendingPathComponent:@"Mcd002.mcr"]; str = [[url path] fileSystemRepresentation]; if (str != nil) strncpy(Config.Mcd2, str, MAXPATHLEN); - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Bios"]; + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Bios"]; str = [[url path] fileSystemRepresentation]; if (str != nil) strncpy(Config.BiosDir, str, MAXPATHLEN); - url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Patches"]; + url = [PcsxrAppSupport URLByAppendingPathComponent:@"Patches"]; str = [[url path] fileSystemRepresentation]; if (str != nil) strncpy(Config.PatchesDir, str, MAXPATHLEN); } else { diff --git a/macosx/config.h b/macosx/config.h index 5896bd91..3be13f38 100644 --- a/macosx/config.h +++ b/macosx/config.h @@ -9,7 +9,7 @@ #define CONFIG_H #ifndef MAXPATHLEN -//match PAX_MAX in <sys/param.h> +//match PATH_MAX in <sys/param.h> #define MAXPATHLEN 1024 #endif diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m index 29ea49e7..500f1c55 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m @@ -101,17 +101,14 @@ NSURL *PSXVertexShader() { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; - NSURL *returnURL = [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; - return returnURL; + return [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; } NSURL *PSXFragmentShader() { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSDictionary *keyValues = [defaults dictionaryForKey:PrefsKey]; - NSURL *returnURL = [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; - return returnURL; - + return [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; } float PSXShaderQuality() @@ -121,7 +118,6 @@ float PSXShaderQuality() return (float)[[keyValues objectForKey:@"ShaderQuality"] intValue]; } - void ReadConfig(void) { NSDictionary *keyValues; @@ -164,23 +160,23 @@ void ReadConfig(void) iFrameLimit = 2; if (iShowFPS) - ulKeybits|=KEY_SHOWFPS; + ulKeybits |= KEY_SHOWFPS; else - ulKeybits&=~KEY_SHOWFPS; + ulKeybits &= ~KEY_SHOWFPS; // additional checks - if(!iColDepth) iColDepth=32; + if(!iColDepth) iColDepth = 32; if(iUseFixes) { - dwActFixes=dwCfgFixes; + dwActFixes = dwCfgFixes; } else { - dwActFixes=0; + dwActFixes = 0; } SetFixes(); - if(iFrameLimit==2) SetAutoFrameCap(); + if(iFrameLimit == 2) SetAutoFrameCap(); bSkipNextFrame = FALSE; - szDispBuf[0]=0; + szDispBuf[0] = 0; BuildDispMenu(0); } @@ -327,6 +323,7 @@ void ReadConfig(void) { [vertexPath release]; [fragmentPath release]; + [keyValues release]; [super dealloc]; } diff --git a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m index 1836ebcd..662b8ebc 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginGLView.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginGLView.m @@ -237,18 +237,18 @@ void BlitScreen16NS(unsigned char * surf,long x,long y) { // Check if an update has occured to the buffer if ([self lockFocusIfCanDraw]) { - - // Make this context current - if (drawBG) { - [[NSColor blackColor] setFill]; - [NSBezierPath fillRect:[self visibleRect]]; - } - - //glFinish() ; - // Swap buffer to screen - //[[self openGLContext] flushBuffer]; - - [self unlockFocus]; + + // Make this context current + if (drawBG) { + [[NSColor blackColor] setFill]; + [NSBezierPath fillRect:[self visibleRect]]; + } + + //glFinish() ; + // Swap buffer to screen + //[[self openGLContext] flushBuffer]; + + [self unlockFocus]; } } |
