From adc29a23861e66c104fb411e67e04019c8888ec9 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 14 Nov 2012 00:19:01 +0000 Subject: Some code refactoring. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81228 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../plugins/DFXVideo/macsrc/PluginConfigController.m | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'macosx/plugins/DFXVideo/macsrc/PluginConfigController.m') 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]]; -- cgit v1.2.3