From 356b1facf0618adca0b1e7a3f54fb8be06f4fedb Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Tue, 23 Jul 2013 23:34:13 +0000 Subject: Change the plug-in implementation on OS X's PeopsXGL plug-in. Properly implement hacks on OS X's implementation of PeopsXGL. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86215 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../English.lproj/NetSfPeopsOpenGLConfig.xib | 2425 ++++++++++---------- .../NetSfPeopsOpenGLPluginConfigController.h | 14 +- .../NetSfPeopsOpenGLPluginConfigController.m | 212 +- 3 files changed, 1390 insertions(+), 1261 deletions(-) (limited to 'macosx/plugins') diff --git a/macosx/plugins/PeopsXgl/English.lproj/NetSfPeopsOpenGLConfig.xib b/macosx/plugins/PeopsXgl/English.lproj/NetSfPeopsOpenGLConfig.xib index 88a2d200..6f72db44 100644 --- a/macosx/plugins/PeopsXgl/English.lproj/NetSfPeopsOpenGLConfig.xib +++ b/macosx/plugins/PeopsXgl/English.lproj/NetSfPeopsOpenGLConfig.xib @@ -2,33 +2,32 @@ 1060 - 11C74 - 1938 - 1138.23 - 567.00 + 12E55 + 3084 + 1187.39 + 626.00 com.apple.InterfaceBuilder.CocoaPlugin - 1938 + 3084 YES - NSObjectController - NSPopUpButtonCell - NSPopUpButton + NSBox NSButton - NSMenu - NSTextFieldCell NSButtonCell - NSMenuItem - NSBox NSColorWell + NSCustomObject + NSMatrix + NSMenu + NSMenuItem + NSPopUpButton + NSPopUpButtonCell NSSlider NSSliderCell - NSCustomObject + NSTextField + NSTextFieldCell NSView NSWindowTemplate - NSTextField - NSUserDefaultsController YES @@ -52,7 +51,7 @@ 1 2 - {{2, 373}, {781, 483}} + {{2, 373}, {549, 483}} 1886912512 GPU Configuration NSWindow @@ -69,12 +68,13 @@ 256 - {{523, 12}, {122, 32}} + {{291, 13}, {122, 32}} + YES - 67239424 + 67108864 134217728 Cancel @@ -83,7 +83,7 @@ 1044 - -2038284033 + -2038284288 1 @@ -91,21 +91,23 @@ 200 25 + NO 256 - {{645, 12}, {122, 32}} + {{413, 13}, {122, 32}} + YES - 67239424 + 67108864 134217728 OK - -2038284033 + -2038284288 1 @@ -113,305 +115,7 @@ 200 25 - - - - 256 - - YES - - - 274 - - YES - - - 256 - {{13, 190}, {144, 18}} - - - 6 - YES - - 67239424 - 131072 - Use PC FPS calculation - - LucidaGrande - 11 - 3100 - - - 6 - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 256 - {{13, 250}, {135, 18}} - - - 2 - YES - - 67239424 - 131072 - Expand screen width - - - 2 - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{13, 150}, {159, 18}} - - - 8 - YES - - 67239424 - 131072 - Use old frame skipping - - - 8 - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{13, 170}, {132, 18}} - - - 7 - YES - - 67239424 - 131072 - Lazy screen updates - - - 7 - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{13, 210}, {135, 18}} - - - 4 - YES - - 67239424 - 131072 - Disable coord check - - - 4 - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{13, 230}, {180, 18}} - - - 3 - YES - - 67239424 - 131072 - Ignore black brightness color - - - 3 - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{13, 270}, {130, 18}} - - - 1 - YES - - 67239424 - 131072 - Odd/even bit hack - - - 1 - 1211912703 - 2 - - - - - 200 - 25 - - - - - 256 - {{13, 110}, {189, 18}} - - - 10 - YES - - 67239424 - 131072 - Draw tex-quads as triangles - - - 10 - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{13, 130}, {195, 18}} - - - 9 - YES - - 67239424 - 131072 - Repeated flat tex triangles - - - 9 - 1211912703 - 2 - - - - 200 - 25 - - - - - 256 - {{13, 90}, {189, 18}} - - - 11 - YES - - 67239424 - 131072 - Fake 'gpu busy' states - - - 11 - 1211912703 - 2 - - - - 200 - 25 - - - - {{2, 2}, {222, 297}} - - - - - {{538, 56}, {226, 301}} - - - {0, 0} - - 67239424 - 0 - - - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 3 - 0 - 0 - NO + NO @@ -429,21 +133,25 @@ {{307, 18}, {189, 18}} + YES - 67239424 + 67108864 0 Sync to Monitor Refresh - 1211912703 + 1211912448 2 - + + NSSwitch + 200 25 + NO @@ -451,14 +159,15 @@ {{307, 60}, {147, 18}} + YES - 67239424 + 67108864 0 Use Frame Skipping - 1211912703 + 1211912448 2 @@ -466,6 +175,7 @@ 200 25 + NO @@ -473,14 +183,15 @@ {{307, 80}, {148, 18}} + YES - 67239424 + 67108864 0 Display FPS Counter - 1211912703 + 1211912448 2 @@ -488,6 +199,7 @@ 200 25 + NO @@ -495,14 +207,15 @@ {{307, 40}, {125, 18}} + YES - 67239424 + 67108864 0 Auto Full Screen - 1211912703 + 1211912448 2 @@ -510,6 +223,7 @@ 200 25 + NO @@ -517,13 +231,14 @@ {{149, 92}, {135, 26}} + YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 1 LucidaGrande @@ -635,6 +350,7 @@ YES 1 + NO @@ -642,9 +358,10 @@ {{17, 97}, {136, 18}} + YES - 67239424 + 67108864 272629760 Fullscreen size @@ -668,6 +385,7 @@ + NO @@ -675,85 +393,108 @@ {{307, 100}, {129, 18}} + YES - 67239424 + 67108864 0 Limit Frame Rate - 1211912703 + 1211912448 2 - + + NSImage + NSSwitch + 200 25 + NO - + 256 - {{18, 38}, {148, 18}} + {{18, 60}, {155, 18}} + YES - - 67239424 + + 67108864 0 - Disable Screensaver + Resize Proportionally - - 1211912703 + + 1211912448 2 - + 200 25 + NO - + - 256 - {{18, 60}, {155, 18}} + 268 + {{125, 14}, {91, 32}} + + _NS:9 YES - - 67239424 - 0 - Resize Proportionally + + 67108864 + 134217728 + Hacks… - - 1211912703 - 2 - - + _NS:9 + + -2038284288 + 129 200 25 + NO {{2, 2}, {510, 127}} + {{17, 333}, {514, 144}} + {0, 0} - 67239424 + 67108864 0 Display Settings - - + + LucidaGrande + 11 + 3100 + + + 6 + System + textBackgroundColor + + 3 + MQA + + 3 MCAwLjgwMDAwMDAxMTkAA @@ -781,9 +522,10 @@ {{15, 219}, {144, 17}} + YES - 67239424 + 67108864 4194304 Dither Graphics: @@ -791,6 +533,7 @@ + NO @@ -798,13 +541,14 @@ {{139, 213}, {174, 26}} + YES - -2076049856 + -2076180416 1024 - 109199615 + 109199360 1 @@ -865,6 +609,7 @@ YES 1 + NO @@ -872,14 +617,15 @@ {{349, 82}, {141, 18}} + YES - 67239424 + 67108864 131072 Draw Wireframes Only - 1211912703 + 1211912448 2 @@ -887,6 +633,7 @@ 200 25 + NO @@ -894,14 +641,15 @@ {{349, 138}, {147, 18}} + YES - 67239424 + 67108864 131072 Use Advanced Blending - 1211912703 + 1211912448 2 @@ -909,6 +657,7 @@ 200 25 + NO @@ -916,14 +665,15 @@ {{349, 119}, {147, 18}} + YES - 67239424 + 67108864 131072 Perform Opaque Pass - 1211912703 + 1211912448 2 @@ -931,6 +681,7 @@ 200 25 + NO @@ -938,14 +689,15 @@ {{349, 100}, {167, 18}} + YES - 67239424 + 67108864 131072 Use Clipping Z-Masks - 1211912703 + 1211912448 2 @@ -953,6 +705,7 @@ 200 25 + NO @@ -960,14 +713,15 @@ {{349, 43}, {147, 18}} + YES - 67239424 + 67108864 131072 Motion JPEG decoder - 1211912703 + 1211912448 2 @@ -975,6 +729,7 @@ 200 25 + NO @@ -982,14 +737,15 @@ {{349, 24}, {147, 18}} + YES - 67239424 + 67108864 131072 15bit Motion JPEGs - 1211912703 + 1211912448 2 @@ -997,6 +753,7 @@ 200 25 + NO @@ -1004,14 +761,16 @@ {{349, 155}, {110, 25}} + + 1 YES - 67239424 + 67108864 131072 Draw scan lines - 1211912703 + 1211912448 2 @@ -1019,6 +778,7 @@ 200 25 + NO @@ -1026,14 +786,15 @@ {{349, 62}, {147, 18}} + YES - 67239424 + 67108864 131072 Add Blur - 1211912703 + 1211912448 2 @@ -1041,6 +802,7 @@ 200 25 + NO @@ -1048,13 +810,14 @@ {{139, 187}, {174, 22}} + YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 1 @@ -1135,6 +898,7 @@ YES 1 + NO @@ -1142,9 +906,10 @@ {{15, 185}, {153, 21}} + YES - 67239424 + 67108864 272629760 Offscreen Drawing @@ -1152,6 +917,7 @@ + NO @@ -1169,13 +935,14 @@ {{105, 91}, {191, 26}} + YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 1 @@ -1184,18 +951,7 @@ 400 75 - - - default - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - - + YES @@ -1203,7 +959,17 @@ YES - + + + default + + 1048576 + 2147483647 + + + _popUpItemAction: + + RGBA 16 @@ -1250,11 +1016,13 @@ + -1 3 YES YES 1 + NO @@ -1262,9 +1030,10 @@ {{13, 65}, {114, 17}} + YES - 67239424 + 67108864 272629760 Enhancement @@ -1272,6 +1041,7 @@ + NO @@ -1279,9 +1049,10 @@ {{13, 27}, {114, 17}} + YES - 67239424 + 67108864 272629760 Filtering @@ -1289,6 +1060,7 @@ + NO @@ -1296,9 +1068,10 @@ {{13, 97}, {114, 17}} + YES - 67239424 + 67108864 272629760 Color Depth @@ -1306,6 +1079,7 @@ + NO @@ -1313,9 +1087,10 @@ {{106, 18}, {189, 26}} + YES - 67239424 + 67108864 0 @@ -1335,6 +1110,7 @@ YES NO + NO @@ -1342,9 +1118,10 @@ {{106, 61}, {189, 26}} + YES - 67239424 + 67108864 0 @@ -1360,19 +1137,22 @@ YES NO + NO {{2, 2}, {307, 139}} + {{15, 13}, {311, 156}} + {0, 0} - 67239424 + 67108864 0 Textures @@ -1398,13 +1178,14 @@ {{345, 187}, {130, 26}} + YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 1 @@ -1462,6 +1243,7 @@ YES 1 + NO @@ -1469,9 +1251,10 @@ {{339, 219}, {141, 17}} + YES - 67239424 + 67108864 272629760 Frame Buffer Effects @@ -1479,6 +1262,7 @@ + NO @@ -1495,7 +1279,9 @@ {{460, 156}, {23, 22}} + YES + NO YES 1 @@ -1508,14 +1294,15 @@ {{349, 5}, {147, 18}} + YES - 67239424 + 67108864 131072 GTE Accuracy - 1211912703 + 1211912448 2 @@ -1523,19 +1310,22 @@ 200 25 + NO {{2, 2}, {511, 256}} + {{17, 56}, {515, 273}} + {0, 0} - 67239424 + 67108864 0 Rendering @@ -1554,17 +1344,18 @@ 256 - {{392, 12}, {122, 32}} + {{160, 13}, {122, 32}} + YES - 67239424 + 67108864 134217728 Reset - -2038284033 + -2038284288 1 @@ -1572,41 +1363,411 @@ 200 25 + NO - - - 256 - {{538, 357}, {211, 68}} - - - YES - - 67239424 - 138543104 - T25seSBlbmFibGUgYSBoYWNrIHRvIGZpeCBhIHNwZWNpZmljIHByb2JsZW0gaW4gYSBnYW1lLgpIb2xk -IHRoZSBtb3VzZSBvdmVyIGEgY2hlY2tib3ggdG8gZ2V0IG1vcmUgaW5mb3JtYXRpb24gYWJvdXQgaXQu -A - - - YES - - - - - - - 256 - {{594, 431}, {106, 18}} - + + {549, 483} + + + + + {{0, 0}, {1920, 1058}} + {283.34100000000001, 129} + {10000000000000, 10000000000000} + YES + + + 15 + 2 + {{196, 207}, {497, 379}} + 1685586944 + Hacks + NSWindow + + + + + 256 + + YES + + + 269 + + YES + + + 274 + + YES + + + 256 + {{17, 13}, {420, 178}} + + + + YES + NO + 9 + 2 + + YES + + 67108864 + 131072 + Adjust framebuffer access + + + 1 + 1211912448 + 2 + + + + + 200 + 25 + + + 67108864 + 131072 + G4 polygon cache + + + 10 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Direct framebuffer updates + + + 2 + 1211912448 + 2 + + + + + 200 + 25 + + + 67108864 + 131072 + Fake subtractive blending + + + 11 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Ignore black brightness color + + + 3 + 1211912448 + 2 + + + + + 200 + 25 + + + 67108864 + 131072 + Lazy upload detection + + + 12 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Swap front/back detection + + + 4 + 1211912448 + 2 + + + + + 200 + 25 + + + 67108864 + 131072 + Odd/even bit hack + + + 13 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Disable coord check + + + 5 + 1211912448 + 2 + + + + + 200 + 25 + + + 67108864 + 131072 + Expand screen width + + + 14 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Remove blue glitches + + + 6 + 1211912448 + 2 + + + + 200 + 25 + + + 67108864 + 131072 + Use old texture filtering + + + 15 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Mixed software FB access + + + 7 + 1211912448 + 2 + + + + 200 + 25 + + + 67108864 + 131072 + Special upload detection + + + 16 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Use PC FPS calculation + + + 8 + 1211912448 + 2 + + + + 200 + 25 + + + 67108864 + 131072 + Use low-res FPS timer + + + 17 + 1211912448 + 2 + + + 200 + 25 + + + 67108864 + 131072 + Use old frame skipping + + + 9 + 1211912448 + 2 + + + + 200 + 25 + + + 67108864 + 131072 + Fake "GPU busy" states + + + 18 + 1211912448 + 2 + + + 200 + 25 + + + {210, 18} + {0, 2} + -2080366592 + + + 67108864 + 131072 + Odd/even bit hack + + 1 + 1211912448 + 2 + + + 200 + 25 + + -1 + -1 + + + + + {{2, 2}, {459, 202}} + + + + + + {{17, 57}, {463, 206}} + + + + {0, 0} + + 67108864 + 0 + + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 3 + 0 + 0 + NO + + + + 269 + {{143, 269}, {211, 68}} + + + + YES + + 67108864 + 138543104 + T25seSBlbmFibGUgYSBoYWNrIHRvIGZpeCBhIHNwZWNpZmljIHByb2JsZW0gaW4gYSBnYW1lLgpIb2xk +IHRoZSBtb3VzZSBvdmVyIGEgY2hlY2tib3ggdG8gZ2V0IG1vcmUgaW5mb3JtYXRpb24gYWJvdXQgaXQu +A + + + YES + + + + NO + + + + 269 + {{195, 343}, {106, 18}} + + YES - - 67239424 + + 67108864 134217728 Enable Hacks - - 1211912703 + + 1211912448 2 @@ -1614,51 +1775,70 @@ A 200 25 + NO + + + + 269 + {{424, 13}, {59, 32}} + + + + _NS:9 + 1 + YES + + 67108864 + 134217728 + OK + + _NS:9 + + -2038284288 + 129 + + DQ + 200 + 25 + + NO + + + + 269 + {{342, 13}, {82, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Cancel + + _NS:9 + + -2038284288 + 129 + + Gw + 200 + 25 + + NO - {781, 483} + {497, 379} + + _NS:20 - {{0, 0}, {1440, 878}} - {283.34100000000001, 129} + {{0, 0}, {1920, 1058}} {10000000000000, 10000000000000} YES - - - YES - Draw Scanlines - Suckass - Fast mjpeg decoder - FPS Counter - Auto Full Screen - VSync - Enable Hacks - Propodrtional Resize - Offscreen Drawing - Dither Mode - Frame Buffer Level - Color Depth Level - Texture Color Depth Level - Texture Filter Level - Advanced Blending - Scanline Color - Frame Limit - Frame Skipping - Proportional Resize - Offscreen Drawing Level - GteAccuracy - - YES - - - - YES - - - YES - @@ -1711,14 +1891,6 @@ A 138 - - - hacksView - - - - 139 - vSync @@ -1743,14 +1915,6 @@ A 143 - - - hackEnable - - - - 229 - fullscreenSize @@ -1875,441 +2039,209 @@ A hackToggle: - - - 355 - - - - delegate - - + - 142 + 500 - initialFirstResponder - - + hacksWindow + + - 145 + 505 - nextKeyView - - - - 9 - - - - value: selection.VSync - - - - - - value: selection.VSync - value - selection.VSync - 2 - - - 325 - - - - value: selection.Frame Skipping - - - - - - value: selection.Frame Skipping - value - selection.Frame Skipping - 2 - + hackEnable + + - 357 + 506 - - value: selection.FPS Counter - - - - - - value: selection.FPS Counter - value - selection.FPS Counter - 2 - + + showHacks: + + - 323 + 507 - - value: selection.Auto Full Screen - - - - - - value: selection.Auto Full Screen - value - selection.Auto Full Screen - 2 - + + hacksMatrix + + - 324 + 509 - - selectedIndex: selection.Dither Mode - - - - - - selectedIndex: selection.Dither Mode - selectedIndex - selection.Dither Mode - 2 - + + gteAccuracy + + - 329 + 510 - - selectedIndex: selection.Texture Color Depth Level - - - - - - selectedIndex: selection.Texture Color Depth Level - selectedIndex - selection.Texture Color Depth Level - 2 - + + toggleCheck: + + - 332 + 511 - - value: selection.Wireframe Mode - - - - - - value: selection.Wireframe Mode - value - selection.Wireframe Mode - 2 - + + toggleCheck: + + - 338 + 512 - - value: selection.Frame Limit - - - - - - value: selection.Frame Limit - value - selection.Frame Limit - 2 - + + toggleCheck: + + - 356 + 513 - - value: selection.Advanced Blending - - - - - - value: selection.Advanced Blending - value - selection.Advanced Blending - 2 - + + toggleCheck: + + - 334 + 514 - - value: selection.Opaque Pass - - - - - - value: selection.Opaque Pass - value - selection.Opaque Pass - 2 - + + toggleCheck: + + - 336 + 515 - - value: selection.Z Mask Clipping - - - - - - value: selection.Z Mask Clipping - value - selection.Z Mask Clipping - 2 - + + scanlineColorWell + + - 337 + 516 - - value: selection.Emulate mjpeg decoder - - - - - - value: selection.Emulate mjpeg decoder - value - selection.Emulate mjpeg decoder - 2 - + + toggleCheck: + + - 340 + 517 - - value: selection.Fast mjpeg decoder - - - - - - value: selection.Fast mjpeg decoder - value - selection.Fast mjpeg decoder - 2 - + + toggleCheck: + + - 319 + 518 - - value: selection.Draw Scanlines - - - - - - value: selection.Draw Scanlines - value - selection.Draw Scanlines - 2 - + + toggleCheck: + + - 322 + 519 - - value: selection.Blur - - - - - - value: selection.Blur - value - selection.Blur - 2 - + + toggleCheck: + + - 339 + 520 - - selectedIndex: selection.Offscreen Drawing Level - - - - - - selectedIndex: selection.Offscreen Drawing Level - selectedIndex - selection.Offscreen Drawing Level - 2 - + + toggleCheck: + + - 359 + 521 - - value: selection.Proportional Resize - - - - - - value: selection.Proportional Resize - value - selection.Proportional Resize - 2 - + + toggleCheck: + + - 358 + 522 - - selectedIndex: selection.Frame Buffer Level - - - - - - selectedIndex: selection.Frame Buffer Level - selectedIndex - selection.Frame Buffer Level - 2 - + + toggleCheck: + + - 330 + 523 - - value: selection.Enable Hacks - - - - - - value: selection.Enable Hacks - value - selection.Enable Hacks - 2 - + + toggleCheck: + + - 326 + 524 - - value: selection.Texture Filter Level - - - - - - value: selection.Texture Filter Level - value - selection.Texture Filter Level - 2 - + + toggleCheck: + + - 333 + 525 - - value: selection.Texture Enhancement Level - - - - - - value: selection.Texture Enhancement Level - value - selection.Texture Enhancement Level - 2 - + + closeHacks: + + - 349 + 526 - - contentObject: values.net.sf.peops.GpuOpenGLPlugin Settings - - - - - - contentObject: values.net.sf.peops.GpuOpenGLPlugin Settings - contentObject - values.net.sf.peops.GpuOpenGLPlugin Settings - - NSHandlesContentAsCompoundValue - - - 2 - + + closeHacks: + + - 353 + 527 - - enabled: selection.Draw Scanlines - - - - - - enabled: selection.Draw Scanlines - enabled - selection.Draw Scanlines - 2 - + + delegate + + - 348 + 142 - - value: selection.Scanline Color - - - - - - value: selection.Scanline Color - value - selection.Scanline Color - - NSValueTransformerName - NSUnarchiveFromData - - 2 - + + initialFirstResponder + + - 354 + 145 - - value: selection.GteAccuracy - - - - - - value: selection.GteAccuracy - value - selection.GteAccuracy - 2 - + + nextKeyView + + - 408 + 9 @@ -2350,14 +2282,11 @@ A YES + + - - - - - @@ -2388,24 +2317,6 @@ A - - 76 - - - YES - - - - - - - - - - - - - 89 @@ -2418,8 +2329,8 @@ A - + @@ -2448,40 +2359,6 @@ A - - 222 - - - YES - - - - - - 223 - - - YES - - - - - - 306 - - - - - 320 - - - - - 350 - - - Shared Defaults - 361 @@ -2497,161 +2374,11 @@ A - - 403 - - - - - 404 - - - -3 - - - Application - - - 75 - - - YES - - - - - - 365 - - - - - 80 - - - YES - - - - - - 368 - - - - - 79 - - - YES - - - - - - 367 - - - - - 82 - - - YES - - - - - - 369 - - - - - 78 - - - YES - - - - - - 366 - - - - - 73 - - - YES - - - - - - 364 - - - - - 147 - - - YES - - - - - - 370 - - - - - 148 - - - YES - - - - - - 371 - - - - - 149 - - - YES - - - - - - 372 - - - - - 150 - - - YES - - - - - - 373 - - + + + Application 93 @@ -2805,20 +2532,6 @@ A - - 187 - - - YES - - - - - - 381 - - - 214 @@ -3290,6 +3003,229 @@ A + + 470 + + + YES + + + + + + 471 + + + + + 472 + + + YES + + + + + + 473 + + + YES + + + + + + + + + + 474 + + + YES + + + + + + 475 + + + YES + + + + + + 476 + + + YES + + + + + + 477 + + + + + 478 + + + + + 479 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + 480 + + + + + 481 + + + + + 482 + + + + + 483 + + + + + 484 + + + + + 485 + + + + + 486 + + + + + 487 + + + + + 488 + + + + + 489 + + + + + 490 + + + + + 491 + + + + + 492 + + + + + 493 + + + + + 494 + + + + + 495 + + + + + 496 + + + + + 497 + + + + + 498 + + + + + 501 + + + YES + + + + + + 502 + + + + + 503 + + + YES + + + + + + 504 + + + @@ -3310,14 +3246,6 @@ A 115.IBPluginDependency 116.IBAttributePlaceholdersKey 116.IBPluginDependency - 147.IBAttributePlaceholdersKey - 147.IBPluginDependency - 148.IBAttributePlaceholdersKey - 148.IBPluginDependency - 149.IBAttributePlaceholdersKey - 149.IBPluginDependency - 150.IBAttributePlaceholdersKey - 150.IBPluginDependency 162.IBAttributePlaceholdersKey 162.IBPluginDependency 163.IBPluginDependency @@ -3350,7 +3278,6 @@ A 183.IBPluginDependency 185.IBAttributePlaceholdersKey 185.IBPluginDependency - 187.IBPluginDependency 193.IBAttributePlaceholdersKey 193.IBPluginDependency 201.IBAttributePlaceholdersKey @@ -3373,8 +3300,6 @@ A 219.IBPluginDependency 220.IBAttributePlaceholdersKey 220.IBPluginDependency - 222.IBPluginDependency - 223.IBPluginDependency 246.IBPluginDependency 247.IBPluginDependency 248.IBPluginDependency @@ -3387,24 +3312,11 @@ A 253.IBPluginDependency 254.IBPluginDependency 255.IBPluginDependency - 306.IBPluginDependency - 320.IBPluginDependency 341.IBAttributePlaceholdersKey 341.IBPluginDependency - 350.IBPluginDependency 361.IBPluginDependency 362.IBPluginDependency 363.IBPluginDependency - 364.IBPluginDependency - 365.IBPluginDependency - 366.IBPluginDependency - 367.IBPluginDependency - 368.IBPluginDependency - 369.IBPluginDependency - 370.IBPluginDependency - 371.IBPluginDependency - 372.IBPluginDependency - 373.IBPluginDependency 374.IBPluginDependency 375.IBPluginDependency 376.IBPluginDependency @@ -3412,7 +3324,6 @@ A 378.IBPluginDependency 379.IBPluginDependency 380.IBPluginDependency - 381.IBPluginDependency 382.IBPluginDependency 383.IBPluginDependency 384.IBPluginDependency @@ -3434,29 +3345,66 @@ A 400.IBPluginDependency 401.IBPluginDependency 402.IBPluginDependency - 403.IBPluginDependency - 404.IBPluginDependency 405.IBAttributePlaceholdersKey 405.IBPluginDependency 406.IBPluginDependency + 470.IBPluginDependency + 471.IBPluginDependency + 472.IBPluginDependency + 472.NSWindowTemplate.visibleAtLaunch + 473.IBPluginDependency + 474.IBPluginDependency + 475.IBPluginDependency + 476.IBPluginDependency + 477.IBPluginDependency + 478.IBPluginDependency + 479.IBPluginDependency + 480.IBAttributePlaceholdersKey + 480.IBPluginDependency + 481.IBAttributePlaceholdersKey + 481.IBPluginDependency + 482.IBAttributePlaceholdersKey + 482.IBPluginDependency + 483.IBAttributePlaceholdersKey + 483.IBPluginDependency + 484.IBAttributePlaceholdersKey + 484.IBPluginDependency + 485.IBAttributePlaceholdersKey + 485.IBPluginDependency + 486.IBAttributePlaceholdersKey + 486.IBPluginDependency + 487.IBAttributePlaceholdersKey + 487.IBPluginDependency + 488.IBAttributePlaceholdersKey + 488.IBPluginDependency + 489.IBAttributePlaceholdersKey + 489.IBPluginDependency + 490.IBAttributePlaceholdersKey + 490.IBPluginDependency + 491.IBAttributePlaceholdersKey + 491.IBPluginDependency + 492.IBAttributePlaceholdersKey + 492.IBPluginDependency + 493.IBAttributePlaceholdersKey + 493.IBPluginDependency + 494.IBAttributePlaceholdersKey + 494.IBPluginDependency + 495.IBAttributePlaceholdersKey + 495.IBPluginDependency + 496.IBAttributePlaceholdersKey + 496.IBPluginDependency + 497.IBAttributePlaceholdersKey + 497.IBPluginDependency + 498.IBPluginDependency 5.IBPluginDependency 5.IBWindowTemplateEditedContentRect + 501.IBPluginDependency + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency 6.IBPluginDependency 7.IBPluginDependency - 73.IBAttributePlaceholdersKey - 73.IBPluginDependency - 75.IBAttributePlaceholdersKey - 75.IBPluginDependency - 76.IBPluginDependency - 78.IBAttributePlaceholdersKey - 78.IBPluginDependency - 79.IBAttributePlaceholdersKey - 79.IBPluginDependency 8.IBPluginDependency - 80.IBAttributePlaceholdersKey - 80.IBPluginDependency - 82.IBAttributePlaceholdersKey - 82.IBPluginDependency 89.IBPluginDependency 93.IBAttributePlaceholdersKey 93.IBPluginDependency @@ -3467,7 +3415,7 @@ A 99.IBAttributePlaceholdersKey 99.IBPluginDependency - + YES com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3504,42 +3452,6 @@ A com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Chrono Cross - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Slightly distorted textures can happen - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Needed by Dark Forces - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Toggles busy flags after drawing - - - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -3649,7 +3561,6 @@ A com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -3720,8 +3631,6 @@ A com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -3742,8 +3651,6 @@ A com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -3784,11 +3691,20 @@ A com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Enabling this will use a faster motion jpeg codec with some quality loss + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3796,28 +3712,75 @@ A com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + For buggy motherboard chipsets + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Needed with epsxe 1.5.2 and older, Chrono Cross + + com.apple.InterfaceBuilder.CocoaPlugin ToolTip ToolTip - - Enabling this will use a faster motion jpeg codec with some quality loss + + Needed by some (buggy) OpenGL ICDs com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + DW7 fix (not 100% perfect...) + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Fixes black areas with some cards + + com.apple.InterfaceBuilder.CocoaPlugin - {{329, 362}, {781, 483}} + + ToolTip + + ToolTip + + Toggles busy flags after drawing + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Shows the full area in Capcom 2D fighters + + com.apple.InterfaceBuilder.CocoaPlugin ToolTip ToolTip - - Fixes black screens in Lunar + + ONLY for FF9 battle mode... yellow rect com.apple.InterfaceBuilder.CocoaPlugin @@ -3825,18 +3788,35 @@ A ToolTip ToolTip - - Better fps limitation with some games + + May show some additional splash screens + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + ONLY for FF7 battle cursor/battle swirl com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Speed up in nasty frame upload situations + + com.apple.InterfaceBuilder.CocoaPlugin ToolTip ToolTip - - Old compatibility mode + + Fixes black screens in Lunar com.apple.InterfaceBuilder.CocoaPlugin @@ -3844,18 +3824,44 @@ A ToolTip ToolTip - - Better fps limitation with some games + + Speed freaks, Killer Loop + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Old coord compatibility mode com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Leg. o. Dragoon, Alpha Multipass needed + + com.apple.InterfaceBuilder.CocoaPlugin ToolTip ToolTip - - Shows the full area in Capcom 2D fighters + + Faster FB access on some systems/ATI + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Better fps limitation with some games com.apple.InterfaceBuilder.CocoaPlugin @@ -3863,12 +3869,22 @@ A ToolTip ToolTip - - Maybe faster, needed for Pandemonium 2 + + Skips only every second frame com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{329, 362}, {781, 483}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin ToolTip @@ -3919,7 +3935,7 @@ A - 408 + 527 @@ -3950,16 +3966,22 @@ A YES cancel: + closeHacks: hackToggle: ok: reset: + showHacks: + toggleCheck: - + YES id id id id + id + id + id @@ -3967,16 +3989,23 @@ A YES cancel: + closeHacks: hackToggle: ok: reset: + showHacks: + toggleCheck: - + YES cancel: id + + closeHacks: + id + hackToggle: id @@ -3989,6 +4018,14 @@ A reset: id + + showHacks: + id + + + toggleCheck: + id + @@ -4006,12 +4043,14 @@ A fullscreenSize gteAccuracy hackEnable - hacksView + hacksMatrix + hacksWindow mjpegDecoder mjpegDecoder15bit offscreenDrawing opaquePass proportionalResize + scanlineColorWell texColorDepth texEnhancment texFiltering @@ -4020,7 +4059,7 @@ A wireframeOnly zMaskClipping - + YES NSControl NSControl @@ -4033,12 +4072,14 @@ A NSPopUpButton NSControl NSControl - NSView + NSMatrix + NSWindow NSControl NSControl NSPopUpButton NSControl NSControl + NSColorWell NSPopUpButton NSSlider NSSlider @@ -4063,12 +4104,14 @@ A fullscreenSize gteAccuracy hackEnable - hacksView + hacksMatrix + hacksWindow mjpegDecoder mjpegDecoder15bit offscreenDrawing opaquePass proportionalResize + scanlineColorWell texColorDepth texEnhancment texFiltering @@ -4077,7 +4120,7 @@ A wireframeOnly zMaskClipping - + YES advancedBlending @@ -4124,8 +4167,12 @@ A NSControl - hacksView - NSView + hacksMatrix + NSMatrix + + + hacksWindow + NSWindow mjpegDecoder @@ -4147,6 +4194,10 @@ A proportionalResize NSControl + + scanlineColorWell + NSColorWell + texColorDepth NSPopUpButton @@ -4190,10 +4241,6 @@ A com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 @@ -4208,10 +4255,10 @@ A NSMenuMixedState NSSwitch - + YES - {9, 8} - {7, 2} + {11, 11} + {10, 3} {15, 15} diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h index 0487006e..6039cb34 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.h @@ -18,8 +18,6 @@ IBOutlet NSPopUpButton *ditherMode; IBOutlet NSControl *fpsCounter; IBOutlet NSControl *frameSkipping; - IBOutlet NSControl *hackEnable; - IBOutlet NSView *hacksView; IBOutlet NSControl *vSync; IBOutlet NSControl *proportionalResize; @@ -42,14 +40,24 @@ IBOutlet NSControl *mjpegDecoder; IBOutlet NSControl *mjpegDecoder15bit; IBOutlet NSControl *gteAccuracy; + IBOutlet NSColorWell *scanlineColorWell; - + IBOutlet NSMatrix *hacksMatrix; + IBOutlet NSControl *hackEnable; + IBOutlet NSWindow *hacksWindow; + NSMutableDictionary *keyValues; } +@property (readwrite, retain) NSMutableDictionary *keyValues; + - (IBAction)cancel:(id)sender; - (IBAction)ok:(id)sender; - (IBAction)reset:(id)sender; +- (IBAction)toggleCheck:(id)sender; + - (IBAction)hackToggle:(id)sender; +- (IBAction)showHacks:(id)sender; +- (IBAction)closeHacks:(id)sender; - (void)loadValues; diff --git a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m index f5f5e7c3..a84c2e0f 100755 --- a/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m +++ b/macosx/plugins/PeopsXgl/macsrc/NetSfPeopsOpenGLPluginConfigController.m @@ -102,6 +102,14 @@ void DlgProc() [window makeKeyAndOrderFront:nil]; } +#define kFPSCounter @"FPS Counter" +#define kHacks @"Hacks" +#define kAutoFullScreen @"Auto Full Screen" +#define kFrameSkipping @"Frame Skipping" +#define kFrameLimit @"Frame Limit" +#define kVSync @"VSync" +#define kHacksEnable @"Enable Hacks" + void PrepFactoryDefaultPreferences(void) { // THE place to find the names of settings. @@ -116,14 +124,14 @@ void PrepFactoryDefaultPreferences(void) [defaults registerDefaults:[NSDictionary dictionaryWithObjectsAndKeys: [NSDictionary dictionaryWithObjectsAndKeys: - @NO, @"FPS Counter", - @NO, @"Auto Full Screen", - @NO, @"Frame Skipping", - @YES, @"Frame Limit", - @NO, @"VSync", - @NO, @"Enable Hacks", + @NO, kFPSCounter, + @NO, kAutoFullScreen, + @NO, kFrameSkipping, + @YES, kFrameLimit, + @NO, kVSync, + @NO, kHacksEnable, @0, @"Dither Mode", - @((unsigned int)0), @"Hacks", + @((unsigned int)0), kHacks, @YES, @"Proportional Resize", //[NSSize stringWithCString: @"default"], @"Fullscreen Resolution", @@ -132,6 +140,7 @@ void PrepFactoryDefaultPreferences(void) @0, @"Texture Enhancement Level", @0, @"Texture Filter Level", @0, @"Frame Buffer Level", + @0, @"Window Size", @NO, @"Draw Scanlines", // nasty: [NSArchiver archivedDataWithRootObject: [NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.25]], @"Scanline Color", @@ -142,6 +151,7 @@ void PrepFactoryDefaultPreferences(void) @NO, @"Wireframe Mode", @YES, @"Emulate mjpeg decoder", // helps remove unsightly vertical line in movies @NO, @"Fast mjpeg decoder", + @YES, @"GteAccuracy", nil], PrefsKey, nil]]; } @@ -157,14 +167,13 @@ void ReadConfig(void) PrepFactoryDefaultPreferences(); // in case user deletes, or on new startup - //NOTE this is NOT the "keyValues" member of the controller. Just sayin. 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 objectForKey:@"FPS Counter"] boolValue]; + iShowFPS = [[keyValues objectForKey:kFPSCounter] boolValue]; - if ([[keyValues objectForKey:@"Frame Limit"] boolValue]){ + if ([[keyValues objectForKey:kFrameLimit] boolValue]){ bUseFrameLimit = 1; iFrameLimit = 2; // required fFrameRate = 60; // required (some number, 60 seems ok) @@ -173,11 +182,11 @@ void ReadConfig(void) // Dithering is either on or off in OpenGL plug, but hey bDrawDither = [[keyValues objectForKey:@"Dither Mode"] intValue]; - bChangeWinMode = [[keyValues objectForKey:@"Auto Full Screen"] boolValue] ? 2 : 1; - bUseFrameSkip = [[keyValues objectForKey:@"Frame Skipping"] boolValue]; + bChangeWinMode = [[keyValues objectForKey:kAutoFullScreen] boolValue] ? 2 : 1; + bUseFrameSkip = [[keyValues objectForKey:kFrameSkipping] boolValue]; - bUseFixes = [[keyValues objectForKey:@"Enable Hacks"] boolValue]; - dwCfgFixes = [[keyValues objectForKey:@"Hacks"] unsignedIntValue]; + bUseFixes = [[keyValues objectForKey:kHacksEnable] boolValue]; + dwCfgFixes = [[keyValues objectForKey:kHacks] unsignedIntValue]; // we always start out at 800x600 (at least until resizing the window is implemented) @@ -187,6 +196,7 @@ void ReadConfig(void) iBlurBuffer = [[keyValues objectForKey:@"Blur"] boolValue]; // not noticeable, but doesn't harm iUseScanLines = [[keyValues objectForKey:@"Draw Scanlines"] boolValue]; // works NSColor* scanColor = [NSUnarchiver unarchiveObjectWithData: [keyValues objectForKey:@"Scanline Color"]]; + scanColor = [scanColor colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; iScanlineColor[0] = [scanColor redComponent]; iScanlineColor[1] = [scanColor greenComponent]; iScanlineColor[2] = [scanColor blueComponent]; @@ -236,13 +246,14 @@ void ReadConfig(void) ulKeybits &=~ KEY_SHOWFPS; // additional checks - if(!iColDepth) iColDepth=32; -#if 0 // was in SoftGPU, not in OpenGL - if(iUseFixes) dwActFixes=dwCfgFixes; - else dwActFixes=0; -#else - dwActFixes = 0; // for now... TODO -#endif + if(!iColDepth) + iColDepth=32; + if(bUseFixes) + { + dwActFixes = dwCfgFixes; + } else { + dwActFixes = 0; + } SetFixes(); @@ -254,47 +265,58 @@ void ReadConfig(void) BuildDispMenu(0); } -@implementation PluginConfigController +@implementation NetSfPeopsOpenGLPluginConfigController + +@synthesize keyValues; - (IBAction)cancel:(id)sender { - //TODO: the IB bindings have already changed everything to what the - // user clicked on. - // Therefore, "backup" settings should be stored before interaction, - // then restored here. - // IMO, 'cancel' is not needed since the config dialog doesn't launch - // an action when "ok" is clicked. [self close]; } - (IBAction)ok:(id)sender { -// most everything is taken care of through bindings in Interface Builder. -// note that the IB interface uses NSObjectController (a dict controller) as a proxy to -// NSUserDefaultsController because NSUserDefaultsController can't -// handle dictionaries. Yup, that's what I said. . - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - [defaults synchronize]; - -// treat hacks specially: unsigned int hackValues = 0; - NSArray *views = [hacksView subviews]; + NSArray *views = [hacksMatrix cells]; - for (NSView *control in views) { - if ([control isKindOfClass:[NSButton class]]) { - hackValues |= [(NSControl *)control intValue] << ([control tag] - 1); - } + for (NSControl *control in views) { + hackValues |= [control intValue] << ([control tag] - 1); } - keyValues = [NSMutableDictionary dictionaryWithDictionary: [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]]; + self.keyValues = [NSMutableDictionary dictionaryWithDictionary: [[NSUserDefaults standardUserDefaults] dictionaryForKey:PrefsKey]]; NSMutableDictionary *writeDic = [NSMutableDictionary dictionaryWithDictionary:keyValues]; - [writeDic setObject:@((unsigned int)hackValues) forKey:@"Hacks"]; + [writeDic setObject:@((unsigned int)hackValues) forKey:kHacks]; + [writeDic setObject:@((BOOL)[hackEnable integerValue]) forKey:kHacksEnable]; + [writeDic setObject:@((BOOL)[fpsCounter integerValue]) forKey:kFPSCounter]; + [writeDic setObject:[NSArchiver archivedDataWithRootObject:[scanlineColorWell color]] forKey:@"Scanline Color"]; + [writeDic setObject:@((BOOL)[frameSkipping integerValue]) forKey:kFrameSkipping]; + [writeDic setObject:@((BOOL)[autoFullScreen integerValue]) forKey:kAutoFullScreen]; + //[writeDic setObject:@((BOOL)[frameLimit integerValue]) forKey:kFrameLimit]; + [writeDic setObject:@((BOOL)[proportionalResize integerValue]) forKey:@"Proportional Resize"]; + [writeDic setObject:@([ditherMode integerValue]) forKey:@"Dither Mode"]; + [writeDic setObject:@([offscreenDrawing integerValue]) forKey:@"Offscreen Drawing Level"]; + [writeDic setObject:@([texColorDepth indexOfItem:[texColorDepth selectedItem]]) forKey:@"Texture Color Depth Level"]; + [writeDic setObject:@([texEnhancment integerValue]) forKey:@"Texture Enhancement Level"]; + [writeDic setObject:@([texFiltering integerValue]) forKey:@"Texture Filter Level"]; + [writeDic setObject:@([frameBufferEffects indexOfItem:[frameBufferEffects selectedItem]]) forKey:@"Frame Buffer Level"]; + [writeDic setObject:@((BOOL)[drawScanlines integerValue]) forKey:@"Draw Scanlines"]; + [writeDic setObject:@((BOOL)[advancedBlending integerValue]) forKey:@"Advanced Blending"]; + [writeDic setObject:@((BOOL)[opaquePass integerValue]) forKey:@"Opaque Pass"]; + [writeDic setObject:@((BOOL)[blurEffect integerValue]) forKey:@"Blur"]; + [writeDic setObject:@((BOOL)[zMaskClipping integerValue]) forKey:@"Z Mask Clipping"]; + [writeDic setObject:@((BOOL)[wireframeOnly integerValue]) forKey:@"Wireframe Mode"]; + [writeDic setObject:@((BOOL)[mjpegDecoder integerValue]) forKey:@"Emulate mjpeg decoder"]; + [writeDic setObject:@((BOOL)[mjpegDecoder15bit integerValue]) forKey:@"Fast mjpeg decoder"]; + [writeDic setObject:@((BOOL)[gteAccuracy integerValue]) forKey:@"GteAccuracy"]; + [writeDic setObject:@((BOOL)[vSync integerValue]) forKey:kVSync]; - // write the preferences with Hacks adjustments + //[writeDic setObject:@([windowSize indexOfItem:[windowSize selectedItem]]) forKey:@"Window Size"]; + + [defaults setObject:writeDic forKey:PrefsKey]; [defaults synchronize]; @@ -312,54 +334,106 @@ void ReadConfig(void) { // enable the "hacks" checkboxes BOOL enable = [sender intValue] ? YES : NO; - NSArray *views = [hacksView subviews]; + NSArray *views = [hacksMatrix cells]; - for (NSView *control in views) { - if ([control isKindOfClass:[NSButton class]]) { - [(NSControl *)control setEnabled:enable]; - } + for (NSControl *control in views) { + [control setEnabled:enable]; } } -- (void)loadValues +- (void)loadHacksValues { -// set up the window with the values in the .plist + unsigned int hackValues = [[self.keyValues objectForKey:kHacks] unsignedIntValue]; + [hackEnable setIntegerValue:[[self.keyValues objectForKey:kHacksEnable] boolValue]]; -// all preferences are bound in Interface Builder. -// Though the "hacks settings" is controlled here because it disables/enables the list -// and uses a bit mask + // build refs to hacks checkboxes + NSArray *views = [hacksMatrix cells]; + for (NSControl *control in views) { + [control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; + } + + [self hackToggle:hackEnable]; +} -// Note that in the .nib, an NSObjectController (aka "dict controller") -// is used as a proxy to NSUserDefaults -// because NSUserDefaults is slightly retarded about nested dictionaries -// OK, "Completely" retarded. +- (void)loadValues +{ +// set up the window with the values in the .plist PrepFactoryDefaultPreferences(); // in case we're starting anew NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; /* load from preferences */ - keyValues = [NSMutableDictionary dictionaryWithDictionary: [defaults dictionaryForKey:PrefsKey]]; + self.keyValues = [NSMutableDictionary dictionaryWithDictionary: [defaults dictionaryForKey:PrefsKey]]; - unsigned int hackValues = [[keyValues objectForKey:@"Hacks"] unsignedIntValue]; + [self loadHacksValues]; + + [autoFullScreen setIntegerValue:[[keyValues objectForKey:kAutoFullScreen] boolValue]]; + [ditherMode selectItemAtIndex:[[keyValues objectForKey:@"Dither Mode"] integerValue]]; + [fpsCounter setIntegerValue:[[keyValues objectForKey:kFPSCounter] boolValue]]; + [scanlineColorWell setColor:[NSUnarchiver unarchiveObjectWithData: [keyValues objectForKey:@"Scanline Color"]]]; + [frameSkipping setIntegerValue:[[keyValues objectForKey:kFrameSkipping] boolValue]]; + [advancedBlending setIntegerValue:[[keyValues objectForKey:@"Advanced Blending"] boolValue]]; + [texFiltering setIntegerValue:[[keyValues objectForKey:@"Texture Filter Level"] integerValue]]; + [texEnhancment setIntegerValue:[[keyValues objectForKey:@"Texture Enhancement Level"] integerValue]]; + [zMaskClipping setIntegerValue:[[keyValues objectForKey:@"Z Mask Clipping"] integerValue]]; + [mjpegDecoder setIntegerValue:[[keyValues objectForKey:@"Emulate mjpeg decoder"] boolValue]]; + [mjpegDecoder15bit setIntegerValue:[[keyValues objectForKey:@"Fast mjpeg decoder"] boolValue]]; + [drawScanlines setIntegerValue:[[keyValues objectForKey:@"Draw Scanlines"] boolValue]]; + [offscreenDrawing selectItemAtIndex:[[keyValues objectForKey:@"Offscreen Drawing Level"] integerValue]]; + [advancedBlending setIntegerValue:[[keyValues objectForKey:@"Advanced Blending"] boolValue]]; + [opaquePass setIntegerValue:[[keyValues objectForKey:@"Opaque Pass"] boolValue]]; + [wireframeOnly setIntegerValue:[[keyValues objectForKey:@"Wireframe Mode"] boolValue]]; + [blurEffect setIntegerValue:[[keyValues objectForKey:@"Blur"] boolValue]]; + [texColorDepth selectItemAtIndex:[[keyValues objectForKey:@"Texture Color Depth Level"] integerValue]]; + [gteAccuracy setIntegerValue:[[keyValues objectForKey:@"GteAccuracy"] boolValue]]; + [scanlineColorWell setEnabled:[[keyValues objectForKey:@"Draw Scanlines"] boolValue]]; + [frameBufferEffects selectItemAtIndex:[[keyValues objectForKey:@"Frame Buffer Level"] integerValue]]; + [vSync setIntegerValue:[[keyValues objectForKey:kVSync] boolValue]]; + [proportionalResize setIntegerValue:[[keyValues objectForKey:@"Proportional Resize"] boolValue]]; - // build refs to hacks checkboxes - NSArray *views = [hacksView subviews]; - for (NSView *control in views) { - if ([control isKindOfClass:[NSButton class]]) { - [(NSControl *)control setIntValue:(hackValues >> ([control tag] - 1)) & 1]; - } - } - [self hackToggle:hackEnable]; + //[windowSize selectItemAtIndex:[[keyValues objectForKey:@"Window Size"] integerValue]]; } - (void)awakeFromNib { - hacksView = [[hacksView subviews] objectAtIndex:0]; + //hacksView = [[hacksView subviews] objectAtIndex:0]; [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; // eliminate dumb behavior! } +- (void)hacksSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +{ + NSParameterAssert(sheet == hacksWindow); + if (returnCode == NSCancelButton) { + //Reset hack preferences. + [self loadHacksValues]; + } + [sheet orderOut:nil]; +} + +- (IBAction)closeHacks:(id)sender +{ + if ([sender tag] == 1) { + [NSApp endSheet:hacksWindow returnCode:NSOKButton]; + } else { + [NSApp endSheet:hacksWindow returnCode:NSCancelButton]; + } +} + +- (IBAction)showHacks:(id)sender +{ + [NSApp beginSheet:hacksWindow modalForWindow:[self window] modalDelegate:self + didEndSelector:@selector(hacksSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL]; +} + +- (IBAction)toggleCheck:(id)sender +{ + if([sender tag] == 1) { + [scanlineColorWell setEnabled: [sender intValue] ? YES : NO]; + } +} + @end #import "OSXPlugLocalization.h" -- cgit v1.2.3