From baef8b3fda33e730ba9db2a5984bf284bbc11564 Mon Sep 17 00:00:00 2001 From: rogerman Date: Sat, 14 Oct 2017 17:29:59 -0700 Subject: [PATCH] Cocoa Port: In the Screenshot Capture Tool, allow users to override the default display scale (calculated from GPU Scaling Factor) with their own user-defined display scale. --- .../src/frontend/cocoa/DefaultUserPrefs.plist | 2 + .../English.lproj/MainMenu.strings | Bin 406004 -> 409412 bytes .../translations/English.lproj/MainMenu.xib | 635 ++++++++++++++++-- .../userinterface/MacScreenshotCaptureTool.h | 2 + .../userinterface/MacScreenshotCaptureTool.mm | 39 +- 5 files changed, 609 insertions(+), 69 deletions(-) diff --git a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist index 25b71a21e..92ceb3d50 100644 --- a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist +++ b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist @@ -758,6 +758,8 @@ 0 ScreenshotCaptureTool_DisplayMode 2 + ScreenshotCaptureTool_DisplayScale + 0 ScreenshotCaptureTool_DisplayRotation 0 ScreenshotCaptureTool_DisplaySeparation diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings index 093d6455381b51c0b968b8ff7f8336d45437961c..62285fcf75b96b05d5efa1999b0676e97658cb24 100644 GIT binary patch delta 692 zcmaKp&ubGw6vt=w&8%8;C~fnrn`j!7nAVEBYL(!@RP<6IjlVz>i<^oFv7tsHDD;q& zz2sENfbXJU{0j_t@ZhC2s3(8iyh-i7)>=HOGm|}g+Q*yk_kBO_?e1oz_b1ZysAqWK zF^|78cO6W8G>W3RG6c6t1y|$7Asjqtnz*xvhiFbrhpZGgb3B9j9*p>Xm&fo;ju*ssI;rEt zdfWFHbv7!RZV?ODVQ=&TsgZ|dfmBF?ERqK#L9UQHvToqduY6n+IEQ&q7h@4>;nsJ< z{EzGJdwK-zqvnLzDyOK8-H;gshuFfIv#|I}uHoKI;mb{!;SP~~tS{1G(Y(Qw_M&0o z;GER_Zl^Gx=9Bok3J0X!!LcDusfyU_!MfHQ^kl&O205R+8J7T@TESWlebG#2QF7M2#)Eo@&50d6`7%m4rY diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib index 43d832ff7..03ffb4b96 100644 --- a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib +++ b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib @@ -2164,9 +2164,9 @@ 134217728 33554432 - + NSImage - NSApplicationIcon + AppIcon_DeSmuME 0 1 @@ -3863,7 +3863,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA -2034483200 100 - + 200 @@ -14890,7 +14890,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -17308,7 +17308,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -18440,7 +18440,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -27969,7 +27969,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -28674,24 +28674,25 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 23 2 - {{57, 380}, {480, 170}} + {{57, 380}, {480, 185}} -461896704 Screenshot Capture Tool NSPanel - {480, 170} - {480, 170} + {480, 190} + {480, 190} - + 256 YES 306 - {{8, 9}, {267, 114}} + {{8, 9}, {267, 127}} + _NS:2337 YES @@ -28713,8 +28714,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 266 - {{10, 129}, {377, 18}} + {{10, 144}, {377, 18}} + _NS:817 YES @@ -28734,8 +28736,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 265 - {{390, 123}, {85, 28}} + {{390, 138}, {85, 28}} + _NS:610 YES @@ -28757,8 +28760,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{11, 148}, {161, 14}} + {{11, 163}, {161, 14}} + _NS:4068 YES @@ -28787,8 +28791,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 - {{155, 10}, {27, 27}} + {{155, 22}, {27, 27}} + YES 67108864 @@ -28809,8 +28814,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 - {{10, 17}, {142, 14}} + {{10, 29}, {142, 14}} + _NS:4068 YES @@ -28829,8 +28835,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 - {{19, 73}, {76, 14}} + {{19, 85}, {76, 14}} + _NS:4068 YES @@ -28849,8 +28856,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 289 - {{10, 51}, {173, 22}} + {{10, 63}, {173, 22}} + _NS:791 YES @@ -28950,8 +28958,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 12 - {{9, 41}, {175, 5}} + {{9, 53}, {175, 5}} + _NS:2429 {0, 0} @@ -28971,13 +28980,15 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 NO - {{1, 1}, {193, 97}} + {{1, 1}, {193, 109}} + _NS:21 - {{278, 9}, {195, 113}} + {{278, 9}, {195, 125}} + _NS:18 {0, 0} @@ -28998,25 +29009,28 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 NO - {480, 170} + {480, 185} + + _NS:103 {{0, 0}, {1440, 878}} - {480, 186} - {480, 186} + {480, 206} + {480, 206} ScreenshotCaptureToolPanel NO - + 256 YES 8 - {{313, 5}, {5, 150}} + {{313, 5}, {5, 165}} + _NS:2182 {0, 0} @@ -29038,8 +29052,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 8 - {{156, 5}, {5, 150}} + {{156, 5}, {5, 165}} + _NS:2182 {0, 0} @@ -29061,8 +29076,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{329, 33}, {74, 14}} + {{329, 53}, {74, 14}} + _NS:4068 YES @@ -29081,8 +29097,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{15, 52}, {103, 14}} + {{15, 32}, {103, 14}} + _NS:4068 YES @@ -29101,8 +29118,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{7, 30}, {146, 22}} + {{7, 10}, {146, 22}} + _NS:791 YES @@ -29188,11 +29206,268 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 NO + + + 264 + {{15, 112}, {92, 14}} + + + _NS:4068 + YES + + 68157504 + 272761856 + Display Scale + + _NS:4068 + + + + + NO + 1 + + + + 264 + {{7, 90}, {146, 22}} + + + _NS:791 + YES + + -2076180416 + 133120 + + _NS:791 + + 109199360 + 129 + + + 400 + 75 + + + Use Emulator Setting + + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + 1x + + 2147483647 + + + _popUpItemAction: + 100 + + + + + 2x + + 2147483647 + + + _popUpItemAction: + 200 + + + + + 3x + + 2147483647 + + + _popUpItemAction: + 300 + + + + + 4x + + 2147483647 + + + _popUpItemAction: + 400 + + + + + 5x + + 2147483647 + + + _popUpItemAction: + 500 + + + + + 6x + + 2147483647 + + + _popUpItemAction: + 600 + + + + + 7x + + 2147483647 + + + _popUpItemAction: + 700 + + + + + 8x + + 2147483647 + + + _popUpItemAction: + 800 + + + + + 9x + + 2147483647 + + + _popUpItemAction: + 900 + + + + + 10x + + 2147483647 + + + _popUpItemAction: + 1000 + + + + + 11x + + 2147483647 + + + _popUpItemAction: + 1100 + + + + + 12x + + 2147483647 + + + _popUpItemAction: + 1200 + + + + + 13x + + 2147483647 + + + _popUpItemAction: + 1300 + + + + + 14x + + 2147483647 + + + _popUpItemAction: + 1400 + + + + + 15x + + 2147483647 + + + _popUpItemAction: + 1500 + + + + + 16x + + 2147483647 + + + _popUpItemAction: + 1600 + + + + + + 1 + YES + YES + 2 + + NO + 264 - {{15, 92}, {92, 14}} + {{15, 72}, {92, 14}} + _NS:4068 YES @@ -29211,8 +29486,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{7, 70}, {146, 22}} + {{7, 50}, {146, 22}} + _NS:791 YES @@ -29290,8 +29566,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{15, 132}, {80, 14}} + {{15, 152}, {80, 14}} + _NS:4068 YES @@ -29310,8 +29587,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{7, 110}, {146, 22}} + {{7, 130}, {146, 22}} + _NS:791 YES @@ -29379,8 +29657,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{329, 74}, {80, 14}} + {{329, 94}, {80, 14}} + _NS:4068 YES @@ -29399,8 +29678,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{172, 132}, {90, 14}} + {{172, 152}, {90, 14}} + _NS:4068 YES @@ -29431,6 +29711,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 12}, {87, 18}} + _NS:682 YES @@ -29454,11 +29735,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {144, 38}} + _NS:21 - {{321, 92}, {146, 54}} + {{321, 112}, {146, 54}} + _NS:18 {0, 0} @@ -29481,8 +29764,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{321, 11}, {146, 22}} + {{321, 31}, {146, 22}} + _NS:791 YES @@ -29747,8 +30031,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{321, 52}, {146, 22}} + {{321, 72}, {146, 22}} + _NS:791 YES @@ -29849,8 +30134,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 264 - {{164, 110}, {146, 22}} + {{164, 130}, {146, 22}} + _NS:791 YES @@ -29951,6 +30237,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{8, 14}, {132, 32}} + _NS:736 YES NO @@ -30196,11 +30483,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {144, 56}} + _NS:21 - {{164, 34}, {146, 72}} + {{164, 54}, {146, 72}} + _NS:18 {0, 0} @@ -30221,14 +30510,16 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 NO - {474, 160} + {474, 175} + + NSView - {474, 160} - {0, 160} - {474, 160} + {474, 175} + {0, 175} + {474, 175} 1 0.0 0.0 @@ -31773,7 +32064,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -32279,7 +32570,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 134217728 33554432 - + 0 3 0 @@ -47141,6 +47432,22 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10987 + + + selectedTag: displayScale + + + + + + selectedTag: displayScale + selectedTag + displayScale + 2 + + + 10999 + @@ -63279,6 +63586,8 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + Screenshot Capture Tool Layout Drawer Content View @@ -64382,6 +64691,154 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + 10989 + + + YES + + + + + + 10990 + + + + + 10988 + + + YES + + + + + + 10991 + + + YES + + + + + + 10992 + + + YES + + + + + + + + + + + + + + + + + + + + + + + 11012 + + + + + 11011 + + + + + 11010 + + + + + 11009 + + + + + 11008 + + + + + 11007 + + + + + 11006 + + + + + 11005 + + + + + 11004 + + + + + 11003 + + + + + 11002 + + + + + 11001 + + + + + 11000 + + + + + 10998 + + + + + 10996 + + + + + 10995 + + + + + 10994 + + + + + 10993 + + + @@ -65014,6 +65471,32 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10960.IBPluginDependency 10960.IBViewBoundsToFrameTransform 10961.IBPluginDependency + 10988.IBPluginDependency + 10988.IBViewBoundsToFrameTransform + 10989.IBPluginDependency + 10989.IBViewBoundsToFrameTransform + 10990.IBPluginDependency + 10991.IBPluginDependency + 10992.IBEditorWindowLastContentRect + 10992.IBPluginDependency + 10993.IBPluginDependency + 10994.IBPluginDependency + 10995.IBPluginDependency + 10996.IBPluginDependency + 10998.IBPluginDependency + 11000.IBPluginDependency + 11001.IBPluginDependency + 11002.IBPluginDependency + 11003.IBPluginDependency + 11004.IBPluginDependency + 11005.IBPluginDependency + 11006.IBPluginDependency + 11007.IBPluginDependency + 11008.IBPluginDependency + 11009.IBPluginDependency + 11010.IBPluginDependency + 11011.IBPluginDependency + 11012.IBPluginDependency 1113.IBPluginDependency 1114.IBPluginDependency 1115.IBPluginDependency @@ -68037,14 +68520,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{670, 692}, {480, 170}} + {{670, 677}, {480, 185}} com.apple.InterfaceBuilder.CocoaPlugin - {{670, 692}, {480, 170}} + {{670, 677}, {480, 185}} - {480, 170} - {480, 170} + {480, 190} + {480, 190} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -68061,7 +68544,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 P4AAAL+AAABD8AAAw9aAAA com.apple.InterfaceBuilder.CocoaPlugin - {{674, 506}, {474, 160}} + {{671, 472}, {474, 175}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -68072,7 +68555,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - AULyAABCsAAAA + AUMkAABCWAAAA com.apple.InterfaceBuilder.CocoaPlugin @@ -68107,7 +68590,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABDr4AAw6wAAA + P4AAAL+AAABDJAAAwxYAAA com.apple.InterfaceBuilder.CocoaPlugin {{827, 550}, {146, 88}} @@ -68169,7 +68652,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABDOwAAw7MAAA + P4AAAL+AAABDLAAAwyQAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -68216,11 +68699,11 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABA4AAAwxAAAA + P4AAAL+AAABA4AAAwtgAAA com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABBcAAAwx4AAA + P4AAAL+AAABBcAAAwvQAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -68365,6 +68848,36 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABA4AAAwtwAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBcAAAwvgAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{664, 271}, {161, 302}} + 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 + 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 + 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 @@ -71796,7 +72309,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 - 10987 + 11012 @@ -75302,6 +75815,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 YES YES + AppIcon_DeSmuME ColorSwatch_Blue_16x16 ColorSwatch_Brown_16x16 ColorSwatch_DarkBlue_16x16 @@ -75339,7 +75853,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 Image_Piano NSActionTemplate NSAddTemplate - NSApplicationIcon NSMenuCheckmark NSMenuMixedState NSPreferencesGeneral @@ -75349,6 +75862,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 YES + {512, 512} {16, 16} {16, 16} {16, 16} @@ -75386,7 +75900,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {515, 457} {14, 14} {8, 8} - {128, 128} {11, 11} {10, 3} {32, 32} diff --git a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h index e01d81076..177353752 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h +++ b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.h @@ -46,6 +46,7 @@ NSInteger displayLayout; NSInteger displayOrder; NSInteger displaySeparation; + NSInteger displayScale; NSInteger displayRotation; BOOL useDeposterize; NSInteger outputFilterID; @@ -63,6 +64,7 @@ @property (assign) NSInteger displayLayout; @property (assign) NSInteger displayOrder; @property (assign) NSInteger displaySeparation; +@property (assign) NSInteger displayScale; @property (assign) NSInteger displayRotation; @property (assign) BOOL useDeposterize; @property (assign) NSInteger outputFilterID; diff --git a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm index 493a17160..372642541 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm +++ b/desmume/src/frontend/cocoa/userinterface/MacScreenshotCaptureTool.mm @@ -38,6 +38,7 @@ @synthesize displayLayout; @synthesize displayOrder; @synthesize displaySeparation; +@synthesize displayScale; @synthesize displayRotation; @synthesize useDeposterize; @synthesize outputFilterID; @@ -51,9 +52,20 @@ return nil; } - sharedData = nil; - saveDirectoryPath = nil; - romName = @"No_ROM_loaded"; + sharedData = nil; + saveDirectoryPath = nil; + romName = @"No_ROM_loaded"; + + fileFormat = NSTIFFFileType; + displayMode = ClientDisplayMode_Dual; + displayLayout = ClientDisplayLayout_Vertical; + displayOrder = ClientDisplayOrder_MainFirst; + displaySeparation = 0; + displayScale = 0; + displayRotation = 0; + useDeposterize = NO; + outputFilterID = OutputFilterTypeID_Bilinear; + pixelScalerID = VideoFilterTypeID_None; return self; } @@ -136,8 +148,9 @@ param->cdpProperty.mode = (ClientDisplayMode)[self displayMode]; param->cdpProperty.layout = (ClientDisplayLayout)[self displayLayout]; param->cdpProperty.order = (ClientDisplayOrder)[self displayOrder]; - param->cdpProperty.gapScale = (float)[self displaySeparation] / 100.0f; - param->cdpProperty.rotation = (float)[self displayRotation]; + param->cdpProperty.gapScale = (double)[self displaySeparation] / 100.0; + param->cdpProperty.rotation = (double)[self displayRotation]; + param->cdpProperty.viewScale = (double)[self displayScale] / 100.0; pthread_t fileWriteThread; pthread_attr_t fileWriteThreadAttr; @@ -177,6 +190,7 @@ [self setDisplayLayout:[[NSUserDefaults standardUserDefaults] integerForKey:@"ScreenshotCaptureTool_DisplayLayout"]]; [self setDisplayOrder:[[NSUserDefaults standardUserDefaults] integerForKey:@"ScreenshotCaptureTool_DisplayOrder"]]; [self setDisplaySeparation:[[NSUserDefaults standardUserDefaults] integerForKey:@"ScreenshotCaptureTool_DisplaySeparation"]]; + [self setDisplayScale:[[NSUserDefaults standardUserDefaults] integerForKey:@"ScreenshotCaptureTool_DisplayScale"]]; [self setDisplayRotation:[[NSUserDefaults standardUserDefaults] integerForKey:@"ScreenshotCaptureTool_DisplayRotation"]]; } @@ -191,6 +205,7 @@ [[NSUserDefaults standardUserDefaults] setInteger:[self displayLayout] forKey:@"ScreenshotCaptureTool_DisplayLayout"]; [[NSUserDefaults standardUserDefaults] setInteger:[self displayOrder] forKey:@"ScreenshotCaptureTool_DisplayOrder"]; [[NSUserDefaults standardUserDefaults] setInteger:[self displaySeparation] forKey:@"ScreenshotCaptureTool_DisplaySeparation"]; + [[NSUserDefaults standardUserDefaults] setInteger:[self displayScale] forKey:@"ScreenshotCaptureTool_DisplayScale"]; [[NSUserDefaults standardUserDefaults] setInteger:[self displayRotation] forKey:@"ScreenshotCaptureTool_DisplayRotation"]; } @@ -215,6 +230,7 @@ static void* RunFileWriteThread(void *arg) param.cdpProperty.order = inParams->cdpProperty.order; param.cdpProperty.gapScale = inParams->cdpProperty.gapScale; param.cdpProperty.rotation = inParams->cdpProperty.rotation; + param.cdpProperty.viewScale = inParams->cdpProperty.viewScale; delete inParams; inParams = NULL; @@ -243,8 +259,14 @@ static void* RunFileWriteThread(void *arg) ClientDisplayPresenter::CalculateNormalSize(param.cdpProperty.mode, param.cdpProperty.layout, param.cdpProperty.gapScale, param.cdpProperty.normalWidth, param.cdpProperty.normalHeight); double transformedWidth = param.cdpProperty.normalWidth; double transformedHeight = param.cdpProperty.normalHeight; + double framebufferScale = (double)displayInfo.customWidth / (double)GPU_FRAMEBUFFER_NATIVE_WIDTH; + + // If the scaling is 0, then calculate the scaling based on the incoming framebuffer size. + if (param.cdpProperty.viewScale == 0) + { + param.cdpProperty.viewScale = framebufferScale; + } - param.cdpProperty.viewScale = (double)displayInfo.customWidth / (double)GPU_FRAMEBUFFER_NATIVE_WIDTH; ClientDisplayPresenter::ConvertNormalToTransformedBounds(param.cdpProperty.viewScale, param.cdpProperty.rotation, transformedWidth, transformedHeight); param.cdpProperty.clientWidth = transformedWidth; @@ -304,8 +326,9 @@ static void* RunFileWriteThread(void *arg) if ( (cdp->GetViewScale() > 0.999) && (cdp->GetViewScale() < 1.001) ) { - // Special case stuff for when capturing the screenshot at the native resolution. - if ( (param.cdpProperty.layout == ClientDisplayLayout_Vertical) || (param.cdpProperty.layout == ClientDisplayLayout_Horizontal) ) + // In the special case of capturing a native-size framebuffer at its native size, don't use any filters for the sake of accuracy. + if ( (param.cdpProperty.layout == ClientDisplayLayout_Vertical) || (param.cdpProperty.layout == ClientDisplayLayout_Horizontal) || + ((framebufferScale > 0.999) && (framebufferScale < 1.001)) ) { cdp->SetOutputFilter(OutputFilterTypeID_NearestNeighbor); }