diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-03-03 19:32:57 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2014-03-03 19:32:57 +0000 |
| commit | bc21097f4380f1b62ace949f1f766ceacbcc7c59 (patch) | |
| tree | ccbe14d38320ee291a0f97816d395a1e8e086421 /macosx/plugins/PeopsXgl | |
| parent | 95d8573be44b40a827f244d920b57d75ecff2a5c (diff) | |
| download | pcsxr-bc21097f4380f1b62ace949f1f766ceacbcc7c59.tar.gz | |
OS X: Messing with xib constraints.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@89253 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/PeopsXgl')
3 files changed, 132 insertions, 129 deletions
diff --git a/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib b/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib index e42c812b..e76147b6 100644 --- a/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib +++ b/macosx/plugins/PeopsXgl/Base.lproj/NetSfPeopsOpenGLConfig.xib @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <dependencies> <deployment defaultVersion="1080" identifier="macosx"/> <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/> @@ -40,17 +40,17 @@ <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> <customObject id="-3" userLabel="Application"/> <window title="GPU Configuration" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window"> - <windowStyleMask key="styleMask" titled="YES"/> + <windowStyleMask key="styleMask" titled="YES" miniaturizable="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> - <rect key="contentRect" x="2" y="373" width="611" height="511"/> + <rect key="contentRect" x="2" y="373" width="611" height="499"/> <rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/> <value key="minSize" type="size" width="283.34100000000001" height="107"/> <view key="contentView" id="6"> - <rect key="frame" x="0.0" y="0.0" width="611" height="511"/> + <rect key="frame" x="0.0" y="0.0" width="611" height="499"/> <autoresizingMask key="autoresizingMask"/> <subviews> <box title="Display Settings" translatesAutoresizingMaskIntoConstraints="NO" id="89"> - <rect key="frame" x="17" y="340" width="577" height="151"/> + <rect key="frame" x="17" y="328" width="577" height="151"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView"> <rect key="frame" x="2" y="2" width="573" height="134"/> @@ -220,14 +220,14 @@ <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </box> <box toolTip="If your card supports it, will mix textures more accurately" title="Rendering" translatesAutoresizingMaskIntoConstraints="NO" id="107"> - <rect key="frame" x="17" y="57" width="577" height="279"/> + <rect key="frame" x="17" y="57" width="577" height="267"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView"> - <rect key="frame" x="2" y="2" width="573" height="262"/> + <rect key="frame" x="2" y="2" width="573" height="250"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <textField toolTip="Specify when to use dithering to render colors" horizontalHuggingPriority="249" verticalHuggingPriority="750" horizontalCompressionResistancePriority="671" translatesAutoresizingMaskIntoConstraints="NO" id="112"> - <rect key="frame" x="15" y="234" width="125" height="17"/> + <rect key="frame" x="15" y="222" width="125" height="17"/> <autoresizingMask key="autoresizingMask"/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Dither Graphics:" id="383"> <font key="font" metaFont="system"/> @@ -236,7 +236,7 @@ </textFieldCell> </textField> <popUpButton toolTip="Specify when to use dithering to render colors" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="116"> - <rect key="frame" x="144" y="228" width="174" height="26"/> + <rect key="frame" x="144" y="216" width="174" height="26"/> <autoresizingMask key="autoresizingMask"/> <constraints> <constraint firstAttribute="width" constant="169" id="624"/> @@ -254,7 +254,7 @@ </popUpButtonCell> </popUpButton> <popUpButton toolTip="Use offscreen drawing to remove some graphics glitches" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="202"> - <rect key="frame" x="144" y="197" width="174" height="26"/> + <rect key="frame" x="144" y="185" width="174" height="26"/> <autoresizingMask key="autoresizingMask"/> <popUpButtonCell key="cell" type="push" title="Default" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="206" id="393"> <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/> @@ -271,7 +271,7 @@ </popUpButtonCell> </popUpButton> <textField toolTip="Use offscreen drawing to remove some graphics glitches" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="207"> - <rect key="frame" x="15" y="203" width="125" height="17"/> + <rect key="frame" x="15" y="191" width="125" height="17"/> <autoresizingMask key="autoresizingMask"/> <constraints> <constraint firstAttribute="height" constant="17" id="Frr-gU-j9s"/> @@ -283,7 +283,7 @@ </textFieldCell> </textField> <box title="Textures" translatesAutoresizingMaskIntoConstraints="NO" id="212"> - <rect key="frame" x="14" y="66" width="318" height="126"/> + <rect key="frame" x="14" y="54" width="318" height="126"/> <autoresizingMask key="autoresizingMask"/> <view key="contentView"> <rect key="frame" x="2" y="2" width="314" height="109"/> @@ -382,7 +382,7 @@ <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/> </box> <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="215"> - <rect key="frame" x="398" y="197" width="130" height="26"/> + <rect key="frame" x="398" y="185" width="130" height="26"/> <autoresizingMask key="autoresizingMask"/> <constraints> <constraint firstAttribute="width" constant="125" id="623"/> @@ -400,7 +400,7 @@ </popUpButtonCell> </popUpButton> <textField toolTip="Select the method the PSX uses to read the contents of the screen" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="220"> - <rect key="frame" x="366" y="234" width="192" height="17"/> + <rect key="frame" x="366" y="222" width="192" height="17"/> <autoresizingMask key="autoresizingMask"/> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Frame Buffer Effects" id="402"> <font key="font" metaFont="system"/> @@ -409,7 +409,7 @@ </textFieldCell> </textField> <colorWell toolTip="Select a color and transparency for the scanlines" translatesAutoresizingMaskIntoConstraints="NO" id="341"> - <rect key="frame" x="337" y="158" width="23" height="22"/> + <rect key="frame" x="337" y="146" width="23" height="22"/> <autoresizingMask key="autoresizingMask"/> <constraints> <constraint firstAttribute="width" constant="23" id="563"/> @@ -418,7 +418,7 @@ <color key="color" red="0.0" green="0.0" blue="0.0" alpha="0.23999999459999999" colorSpace="calibratedRGB"/> </colorWell> <matrix verticalHuggingPriority="750" mode="highlight" allowsEmptySelection="NO" autosizesCells="NO" translatesAutoresizingMaskIntoConstraints="NO" id="702"> - <rect key="frame" x="368" y="30" width="188" height="150"/> + <rect key="frame" x="368" y="18" width="188" height="150"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <size key="cellSize" width="155" height="14"/> @@ -510,16 +510,16 @@ <constraint firstItem="112" firstAttribute="leading" secondItem="107" secondAttribute="leading" constant="16" id="995"/> <constraint firstItem="220" firstAttribute="baseline" secondItem="116" secondAttribute="baseline" id="997"/> <constraint firstItem="215" firstAttribute="baseline" secondItem="207" secondAttribute="baseline" id="1000"/> - <constraint firstItem="215" firstAttribute="centerY" secondItem="202" secondAttribute="centerY" id="1001"/> <constraint firstItem="702" firstAttribute="leading" secondItem="341" secondAttribute="trailing" constant="8" symbolic="YES" id="1006"/> <constraint firstItem="341" firstAttribute="leading" secondItem="212" secondAttribute="trailing" constant="8" symbolic="YES" id="1009"/> <constraint firstItem="702" firstAttribute="top" secondItem="215" secondAttribute="bottom" constant="20" id="1016"/> <constraint firstItem="341" firstAttribute="top" secondItem="702" secondAttribute="top" id="1017"/> - <constraint firstAttribute="bottom" secondItem="702" secondAttribute="bottom" constant="28" id="3Ng-tn-NLl"/> + <constraint firstAttribute="bottom" secondItem="702" secondAttribute="bottom" constant="16" id="3Ng-tn-NLl"/> <constraint firstItem="112" firstAttribute="leading" secondItem="207" secondAttribute="leading" id="7oK-ZZ-JYr"/> <constraint firstItem="202" firstAttribute="top" secondItem="116" secondAttribute="bottom" constant="10" symbolic="YES" id="O3g-hv-kg2"/> <constraint firstItem="112" firstAttribute="trailing" secondItem="207" secondAttribute="trailing" id="PhN-KE-FcQ"/> <constraint firstItem="212" firstAttribute="top" secondItem="202" secondAttribute="bottom" constant="8" symbolic="YES" id="RYi-RA-sus"/> + <constraint firstItem="202" firstAttribute="baseline" secondItem="207" secondAttribute="baseline" id="gHf-9B-iw5"/> <constraint firstItem="202" firstAttribute="leading" secondItem="207" secondAttribute="trailing" constant="8" symbolic="YES" id="naS-nh-gFe"/> </constraints> <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/> diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h index f5a22943..918fe825 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h @@ -35,7 +35,7 @@ @property (weak) IBOutlet NSMatrix *hacksMatrix; @property (weak) IBOutlet NSControl *hackEnable; @property (weak) IBOutlet NSWindow *hacksWindow; -@property (readwrite, retain) NSMutableDictionary *keyValues; +@property (readwrite, strong) NSMutableDictionary *keyValues; - (IBAction)cancel:(id)sender; - (IBAction)ok:(id)sender; diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index 29a2b269..9f8daad1 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -88,7 +88,7 @@ void DlgProc() RunOnMainThreadSync(^{ NSWindow *window; - PrepFactoryDefaultPreferences(); // Must do here to avoid a "when does such-and-such bind" issue + PrepFactoryDefaultPreferences(); if (windowController == nil) { windowController = [[PluginConfigController alloc] initWithWindowNibName:@"NetSfPeopsOpenGLConfig"]; @@ -114,16 +114,16 @@ void DlgProc() void PrepFactoryDefaultPreferences(void) { - // THE place to find the names of settings. - // If it's not here, you can't set it. - - // create or read a sub-dictionary beneath the main PCSXR app prefs. - // dictionary is named "net.sf.GpuOpenGLPlugin Settings" - // and contains all our key/values - // the prefs .plist will store this dictionary ("net.sf...") as an object - + // THE place to find the names of settings. + // If it's not here, you can't set it. + + // create or read a sub-dictionary beneath the main PCSXR app prefs. + // dictionary is named "net.sf.GpuOpenGLPlugin Settings" + // and contains all our key/values + // the prefs .plist will store this dictionary ("net.sf...") as an object + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + NSDictionary* keyValues = [defaults dictionaryForKey:PrefsKey]; BOOL windowSizeNeedsReset = NO; if (keyValues) { @@ -144,59 +144,61 @@ void PrepFactoryDefaultPreferences(void) } keyValues = nil; - [defaults registerDefaults:@{PrefsKey: @{kFPSCounter: @NO, - kAutoFullScreen: @NO, - kFrameSkipping: @NO, - kFrameLimit: @YES, - kVSync: @NO, - kHacksEnable: @NO, - @"Dither Mode": @0, - kHacks: @0, - - @"Proportional Resize": @YES, - //[NSSize stringWithCString: @"default"], @"Fullscreen Resolution", - @"Offscreen Drawing Level": @2, - @"Texture Color Depth Level": @0, - @"Texture Enhancement Level": @0, - @"Texture Filter Level": @0, - @"Frame Buffer Level": @0, - kWindowSize: NSStringFromSize(NSMakeSize(800, 600)), - @"Draw Scanlines": @NO, - // nasty: - @"Scanline Color": [NSArchiver archivedDataWithRootObject: [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.25]], - @"Advanced Blending": @NO, - @"Opaque Pass": @NO, - @"Blur": @NO, - @"Z Mask Clipping": @YES, - @"Wireframe Mode": @NO, - @"Emulate mjpeg decoder": @YES, // helps remove unsightly vertical line in movies - @"Fast mjpeg decoder": @NO, - @"GteAccuracy": @YES}}]; + [defaults registerDefaults: + @{PrefsKey: + @{kFPSCounter: @NO, + kAutoFullScreen: @NO, + kFrameSkipping: @NO, + kFrameLimit: @YES, + kVSync: @NO, + kHacksEnable: @NO, + @"Dither Mode": @0, + kHacks: @0, + + @"Proportional Resize": @YES, + //[NSSize stringWithCString: @"default"], @"Fullscreen Resolution", + @"Offscreen Drawing Level": @2, + @"Texture Color Depth Level": @0, + @"Texture Enhancement Level": @0, + @"Texture Filter Level": @0, + @"Frame Buffer Level": @0, + kWindowSize: NSStringFromSize(NSMakeSize(800, 600)), + @"Draw Scanlines": @NO, + // nasty: + @"Scanline Color": [NSArchiver archivedDataWithRootObject: [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.25]], + @"Advanced Blending": @NO, + @"Opaque Pass": @NO, + @"Blur": @NO, + @"Z Mask Clipping": @YES, + @"Wireframe Mode": @NO, + @"Emulate mjpeg decoder": @YES, // helps remove unsightly vertical line in movies + @"Fast mjpeg decoder": @NO, + @"GteAccuracy": @YES}}]; } void ReadConfig(void) { - // set up PCSXR GPU plug's global variables according to user preferences. - // this is called from the PCSXR GPU plugin thread via GPUOpen. - - // has nothing to do with the Configuration dialog box, btw., other than the - // fact that the config dialog writes to user prefs. This only reads, which - // is important because PCSXR will change its globals on the fly - // and saving those new ad hoc changes is Bad for the user. - - PrepFactoryDefaultPreferences(); // in case user deletes, or on new startup - - NSDictionary* keyValues = [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]; - - // bind all prefs settings to their PCSXR counterparts - // with a little finagling to make it work as expected + // set up PCSXR GPU plug's global variables according to user preferences. + // this is called from the PCSXR GPU plugin thread via GPUOpen. + + // has nothing to do with the Configuration dialog box, btw., other than the + // fact that the config dialog writes to user prefs. This only reads, which + // is important because PCSXR will change its globals on the fly + // and saving those new ad hoc changes is Bad for the user. + + PrepFactoryDefaultPreferences(); // in case user deletes, or on new startup + + NSDictionary* keyValues = [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]; + + // bind all prefs settings to their PCSXR counterparts + // with a little finagling to make it work as expected iShowFPS = [keyValues[kFPSCounter] boolValue]; - - if ([keyValues[kFrameLimit] boolValue]){ - bUseFrameLimit = 1; - iFrameLimit = 2; // required - fFrameRate = 60; // required (some number, 60 seems ok) - } + + if ([keyValues[kFrameLimit] boolValue]) { + bUseFrameLimit = 1; + iFrameLimit = 2; // required + fFrameRate = 60; // required (some number, 60 seems ok) + } // Dithering is either on or off in OpenGL plug, but hey bDrawDither = [keyValues[@"Dither Mode"] intValue]; @@ -206,7 +208,6 @@ void ReadConfig(void) bUseFixes = [keyValues[kHacksEnable] boolValue]; dwCfgFixes = [keyValues[kHacks] unsignedIntValue]; - // we always start out at 800x600 (at least until resizing the window is implemented) NSSize winSize = NSSizeFromString(keyValues[kWindowSize]); @@ -218,52 +219,54 @@ void ReadConfig(void) iResY = 600; } - iBlurBuffer = [keyValues[@"Blur"] boolValue]; // not noticeable, but doesn't harm - iUseScanLines = [keyValues[@"Draw Scanlines"] boolValue]; // works - NSColor* scanColor = [NSUnarchiver unarchiveObjectWithData:keyValues[@"Scanline Color"]]; + iBlurBuffer = [keyValues[@"Blur"] boolValue]; // not noticeable, but doesn't harm + iUseScanLines = [keyValues[@"Draw Scanlines"] boolValue]; // works + NSColor* scanColor = [NSUnarchiver unarchiveObjectWithData:keyValues[@"Scanline Color"]]; scanColor = [scanColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; - iScanlineColor[0] = [scanColor redComponent]; - iScanlineColor[1] = [scanColor greenComponent]; - iScanlineColor[2] = [scanColor blueComponent]; - iScanlineColor[3] = [scanColor alphaComponent]; - - iScanBlend = 0; // we always draw nice since it costs nothing. - iUseMask = [keyValues[@"Z Mask Clipping"] boolValue]; // works, clips polygons with primitive "Z" buffer - bUseLines = [keyValues[@"Wireframe Mode"] boolValue]; // works, aka "Wireframe" mode - iOffscreenDrawing = [keyValues[@"Offscreen Drawing Level"] intValue]; // draw offscreen for texture building? - if (iOffscreenDrawing > 4) iOffscreenDrawing = 4; - if (iOffscreenDrawing < 0) iOffscreenDrawing = 0; - + iScanlineColor[0] = [scanColor redComponent]; + iScanlineColor[1] = [scanColor greenComponent]; + iScanlineColor[2] = [scanColor blueComponent]; + iScanlineColor[3] = [scanColor alphaComponent]; + + iScanBlend = 0; // we always draw nice since it costs nothing. + iUseMask = [keyValues[@"Z Mask Clipping"] boolValue]; // works, clips polygons with primitive "Z" buffer + bUseLines = [keyValues[@"Wireframe Mode"] boolValue]; // works, aka "Wireframe" mode + iOffscreenDrawing = [keyValues[@"Offscreen Drawing Level"] intValue]; // draw offscreen for texture building? + if (iOffscreenDrawing > 4) iOffscreenDrawing = 4; + if (iOffscreenDrawing < 0) iOffscreenDrawing = 0; + // texture quality, whatever that means (doesn't hurt), more like "texture handling" or "texture performance" - iFrameTexType = [keyValues[@"Frame Buffer Level"] intValue]; - if (iFrameTexType > 3) iFrameTexType = 3; - if (iFrameTexType < 0) iFrameTexType = 0; - - iTexQuality = [keyValues[@"Texture Color Depth Level"] intValue]; - if (iTexQuality > 4) iTexQuality = 4; - if (iTexQuality < 0) iTexQuality = 0; + iFrameTexType = [keyValues[@"Frame Buffer Level"] intValue]; + if (iFrameTexType > 3) iFrameTexType = 3; + if (iFrameTexType < 0) iFrameTexType = 0; + + iTexQuality = [keyValues[@"Texture Color Depth Level"] intValue]; + if (iTexQuality > 4) iTexQuality = 4; + if (iTexQuality < 0) iTexQuality = 0; // MAG_FILTER = LINEAR, etc. - iFilterType = [keyValues[@"Texture Filter Level"] intValue]; - if (iFilterType > 2) iFilterType = 2; - if (iFilterType < 0) iFilterType = 0; - + iFilterType = [keyValues[@"Texture Filter Level"] intValue]; + if (iFilterType > 2) iFilterType = 2; + if (iFilterType < 0) iFilterType = 0; + // stretches textures (more detail). You'd think it would look great, but it's not massively better. NEEDS iFilterType to be of any use. - iHiResTextures = [keyValues[@"Texture Enhancement Level"] intValue]; - if (iHiResTextures > 2) iHiResTextures = 2; - if (iHiResTextures < 0) iHiResTextures = 0; - - // well actually, the "SaI" mode is best, but is #1, so swap qualities: - if (iHiResTextures != 0) - iHiResTextures = 3 - iHiResTextures; - - if (iHiResTextures && !iFilterType) - iFilterType = 1; // needed to see any real effect - - bUseFastMdec = [keyValues[@"Emulate mjpeg decoder"] boolValue]; - bUse15bitMdec = [keyValues[@"Fast mjpeg decoder"] boolValue]; - bGteAccuracy = [keyValues[@"GteAccuracy"] boolValue]; + iHiResTextures = [keyValues[@"Texture Enhancement Level"] intValue]; + if (iHiResTextures > 2) + iHiResTextures = 2; + if (iHiResTextures < 0) + iHiResTextures = 0; + + // well actually, the "SaI" mode is best, but is #1, so swap qualities: + if (iHiResTextures != 0) + iHiResTextures = 3 - iHiResTextures; + + if (iHiResTextures && !iFilterType) + iFilterType = 1; // needed to see any real effect + + bUseFastMdec = [keyValues[@"Emulate mjpeg decoder"] boolValue]; + bUse15bitMdec = [keyValues[@"Fast mjpeg decoder"] boolValue]; + bGteAccuracy = [keyValues[@"GteAccuracy"] boolValue]; if (iShowFPS) ulKeybits |= KEY_SHOWFPS; @@ -369,10 +372,10 @@ void ReadConfig(void) - (IBAction)hackToggle:(id)sender { - // enable the "hacks" checkboxes + // enable the "hacks" checkboxes BOOL enable = [sender intValue] ? YES : NO; NSArray *views = [hacksMatrix cells]; - + for (NSControl *control in views) { [control setEnabled:enable]; } @@ -382,8 +385,8 @@ void ReadConfig(void) { unsigned int hackValues = [(self.keyValues)[kHacks] unsignedIntValue]; [hackEnable setIntegerValue:[(self.keyValues)[kHacksEnable] boolValue]]; - - // build refs to hacks checkboxes + + // build refs to hacks checkboxes for (NSControl *control in [hacksMatrix cells]) { [control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; } @@ -393,15 +396,15 @@ void ReadConfig(void) - (void)loadValues { -// set up the window with the values in the .plist - - PrepFactoryDefaultPreferences(); // in case we're starting anew - + // set up the window with the values in the .plist + + PrepFactoryDefaultPreferences(); // in case we're starting anew + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - + /* load from preferences */ - self.keyValues = [NSMutableDictionary dictionaryWithDictionary: [defaults dictionaryForKey:PrefsKey]]; - + self.keyValues = [[defaults dictionaryForKey:PrefsKey] mutableCopy]; + [self loadHacksValues]; [autoFullScreen setIntegerValue:[keyValues[kAutoFullScreen] boolValue]]; |
