diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-11-14 00:19:01 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-11-14 00:19:01 +0000 |
| commit | adc29a23861e66c104fb411e67e04019c8888ec9 (patch) | |
| tree | 8467d150d7996274373e6ab779f2493bfe3fc200 /macosx/plugins/DFXVideo/macsrc/PluginConfigController.m | |
| parent | 12aa7f2aede572fac6f404ef6067068387ce321c (diff) | |
Some code refactoring.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81228 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFXVideo/macsrc/PluginConfigController.m')
| -rw-r--r-- | macosx/plugins/DFXVideo/macsrc/PluginConfigController.m | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m index 620ca872..a36e90d7 100644 --- a/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFXVideo/macsrc/PluginConfigController.m @@ -287,24 +287,20 @@ void ReadConfig(void) { BOOL resetPrefs = NO; vertexPath = [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"VertexShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; - if (vertexPath) { - [vertexPath retain]; - } else { + if (!vertexPath) { resetPrefs = YES; } fragmentPath = [NSURL URLByResolvingBookmarkData:[keyValues objectForKey:@"FragmentShader"] options:NSURLBookmarkResolutionWithoutUI relativeToURL:nil bookmarkDataIsStale:NULL error:nil]; - if (fragmentPath) { - [fragmentPath retain]; - } else { + if (!fragmentPath) { resetPrefs = YES; } if (resetPrefs) { - NSBundle *selfBundle = [NSBundle bundleWithIdentifier:APP_ID]; - [vertexPath release]; - [fragmentPath release]; - vertexPath = [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"] retain]; - fragmentPath = [[selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"] retain]; + NSBundle *selfBundle = [NSBundle bundleForClass:[self class]]; + vertexPath = [selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slv"]; + fragmentPath = [selfBundle URLForResource:@"gpuPeteOGL2" withExtension:@"slf"]; } + [vertexPath retain]; + [fragmentPath retain]; } [fpsCounter setIntValue:[[keyValues objectForKey:@"FPS Counter"] intValue]]; [autoFullScreen setIntValue:[[keyValues objectForKey:@"Auto Full Screen"] intValue]]; |
