diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-09-23 18:41:37 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-09-23 18:41:37 +0000 |
| commit | 76108ffe79e616d9820b6bc2b510cce32dd20093 (patch) | |
| tree | 68ae96ffd98de13a2dc9119f099f787aaf151322 /macosx/plugins | |
| parent | dd1ad114b17dac74f94d4a02057e017b592216dc (diff) | |
| download | pcsxr-76108ffe79e616d9820b6bc2b510cce32dd20093.tar.gz | |
Modernizing PeopsXGL for OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@79977 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins')
| -rw-r--r-- | macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index 51c4ecfe..b75258f7 100644 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -241,9 +241,9 @@ void ReadConfig(void) bGteAccuracy = [[keyValues objectForKey:@"GteAccuracy"] boolValue]; if (iShowFPS) - ulKeybits|=KEY_SHOWFPS; + ulKeybits |= KEY_SHOWFPS; else - ulKeybits&=~KEY_SHOWFPS; + ulKeybits &=~ KEY_SHOWFPS; // additional checks if(!iColDepth) iColDepth=32; @@ -251,7 +251,7 @@ void ReadConfig(void) if(iUseFixes) dwActFixes=dwCfgFixes; else dwActFixes=0; #else - dwActFixes=0; // for now... TODO + dwActFixes = 0; // for now... TODO #endif @@ -261,7 +261,7 @@ void ReadConfig(void) if(iFrameLimit==2) SetAutoFrameCap(); bSkipNextFrame = FALSE; - szDispBuf[0]=0; + szDispBuf[0] = 0; BuildDispMenu(0); } @@ -292,10 +292,9 @@ void ReadConfig(void) // treat hacks specially: unsigned long hackValues = 0; - int i; NSArray *views = [hacksView subviews]; - for (i=0; i<[views count]; i++) { - NSView *control = [views objectAtIndex:i]; + + for (NSView *control in views) { if ([control isKindOfClass:[NSButton class]]) { hackValues |= [(NSControl *)control intValue] << ([control tag] - 1); } @@ -304,7 +303,7 @@ void ReadConfig(void) keyValues = [NSMutableDictionary dictionaryWithDictionary: [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]]; NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; - [writeDic setObject:[NSNumber numberWithLong:hackValues] forKey:@"Hacks"]; + [writeDic setObject:[NSNumber numberWithUnsignedLong:hackValues] forKey:@"Hacks"]; // write the preferences with Hacks adjustments [defaults setObject:writeDic forKey:PrefsKey]; @@ -324,11 +323,9 @@ void ReadConfig(void) { // enable the "hacks" checkboxes BOOL enable = [sender intValue] ? YES : NO; - int i; NSArray *views = [hacksView subviews]; - for (i=0; i<[views count]; i++) { - NSView *control = [views objectAtIndex:i]; + for (NSView *control in views) { if ([control isKindOfClass:[NSButton class]]) { [(NSControl *)control setEnabled:enable]; } @@ -355,13 +352,11 @@ void ReadConfig(void) /* load from preferences */ keyValues = [NSMutableDictionary dictionaryWithDictionary: [defaults dictionaryForKey:PrefsKey]]; - unsigned long hackValues = [[keyValues objectForKey:@"Hacks"] longValue]; + unsigned long hackValues = [[keyValues objectForKey:@"Hacks"] unsignedLongValue]; // build refs to hacks checkboxes - int i; NSArray *views = [hacksView subviews]; - for (i=0; i<[views count]; i++) { - NSView *control = [views objectAtIndex:i]; + for (NSView *control in views) { if ([control isKindOfClass:[NSButton class]]) { [(NSControl *)control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; } |
