Manic EMU is an all-in-one retro game emulator for iOS. It packs powerful features while keeping a clean, sleek UI and delivering buttery-smooth gameplay.
Swift
complete the J2ME functionality
Daiunoac0c686c5a43
diff --git a/.gitignore b/.gitignoreindex d6fb9097..85461334 100644--- a/.gitignore+++ b/.gitignore@@ -97,4 +97,17 @@ Cores/libretro-ppssppCores/libretro-azaharCores/J2meJSCores/freej2me-web+Cores/melonDSi18n/++#claude code+.claude+CLAUDE.md+SKILL.md+.xcodebuildmcp++#cursor+.cursor++#vscode+.vscodediff --git a/Cores/DeltaCore/DeltaCore/Model/Inputs/StandardGameControllerInput.swift b/Cores/DeltaCore/DeltaCore/Model/Inputs/StandardGameControllerInput.swiftindex 2c2404f1..ab3a1f10 100644--- a/Cores/DeltaCore/DeltaCore/Model/Inputs/StandardGameControllerInput.swift+++ b/Cores/DeltaCore/DeltaCore/Model/Inputs/StandardGameControllerInput.swift@@ -55,6 +55,8 @@ public enum StandardGameControllerInput: String, Codablecase tvType//Color or BW bindablecase leftDifficulty // A or B bindablecase rightDifficulty //A or B bindable+ case screenScaling+ case j2meSettingscase upcase downdiff --git a/Cores/DeltaCore/DeltaCore/UI/Controller/ControllerView.swift b/Cores/DeltaCore/DeltaCore/UI/Controller/ControllerView.swiftindex 4ecb0d17..57cc49d2 100644--- a/Cores/DeltaCore/DeltaCore/UI/Controller/ControllerView.swift+++ b/Cores/DeltaCore/DeltaCore/UI/Controller/ControllerView.swift@@ -176,6 +176,9 @@ public class ControllerView: UIView, GameControllerprivate(set) var imageCache = NSCache<NSString, NSCache<NSString, UIImage>>()+ //如果允许的话 会判断按钮是否被点中,没有被点中则允许点击穿透,默认为false 设置为true可能会有性能损失+ public var allowTapThroughIfButtonNotHit = false+public override var intrinsicContentSize: CGSize {return buttonsView.intrinsicContentSize}@@ -372,6 +375,15 @@ public class ControllerView: UIView, GameControllerreturn switchView}+ if allowTapThroughIfButtonNotHit {+ let buttonsViewPoint = buttonsView.convert(point, from: self)+ if let inputs = buttonsView.inputs(at: buttonsViewPoint), inputs.count > 0 {+ return buttonsView+ } else {+ return nil+ }+ }+return buttonsView}diff --git a/Cores/Libretro/ui/drivers/LibretroCore.m b/Cores/Libretro/ui/drivers/LibretroCore.mindex 671bf68f..79eb1152 100644--- a/Cores/Libretro/ui/drivers/LibretroCore.m+++ b/Cores/Libretro/ui/drivers/LibretroCore.m@@ -680,6 +680,10 @@ static void libretroLogCallback(enum retro_log_level level, const char *fmt, va_return [[self getRetroArch] isSearchingAmiibo];}+- (void)setFullScreen:(BOOL)isFullScreen {+ [[self getRetroArch] setFullScreen:isFullScreen];+}+#pragma mark - Azahar Keyboard Support// Structure matching retro_keyboard_config from libretro.hdiff --git a/Cores/Libretro/ui/drivers/cocoa/LibretroCore.h b/Cores/Libretro/ui/drivers/cocoa/LibretroCore.hindex 74444d14..304cb32b 100644--- a/Cores/Libretro/ui/drivers/cocoa/LibretroCore.h+++ b/Cores/Libretro/ui/drivers/cocoa/LibretroCore.h@@ -109,6 +109,7 @@ extern NSString * const RetroAchievementsNotification;- (void)registerAzaharKeyboard:(void(^ _Nullable)(AzaharKeyboardConfig *_Nonnull config))callback;- (void)inputAzaharKeyboard:(NSString *_Nullable)text buttonType:(AzaharButtonType)buttonType;+ (NSString *_Nullable)getPSPGameIDWithRomPath:(NSString *_Nonnull)romPath;+- (void)setFullScreen:(BOOL)isFullScreen;@enddiff --git a/Cores/Libretro/ui/drivers/cocoa/apple_platform.h b/Cores/Libretro/ui/drivers/cocoa/apple_platform.hindex d0ffe4b3..f01ffb2f 100644--- a/Cores/Libretro/ui/drivers/cocoa/apple_platform.h+++ b/Cores/Libretro/ui/drivers/cocoa/apple_platform.h@@ -157,6 +157,7 @@ UINavigationControllerDelegate> {- (void)setFastforwardFrameSkip:(BOOL)frameSkip;- (void)loadAmiibo:(NSString *_Nonnull)path;- (BOOL)isSearchingAmiibo;+- (void)setFullScreen:(BOOL)isFullScreen;@end#elsediff --git a/Cores/Libretro/ui/drivers/ui_cocoatouch.m b/Cores/Libretro/ui/drivers/ui_cocoatouch.mindex 7efc67e9..181b0507 100644--- a/Cores/Libretro/ui/drivers/ui_cocoatouch.m+++ b/Cores/Libretro/ui/drivers/ui_cocoatouch.m@@ -2264,6 +2264,17 @@ static NSString * _Nullable g_customSaveExtension = nil;return NO;}+- (void)setFullScreen:(BOOL)isFullScreen {+ settings_t *settings = config_get_ptr();+ if (!settings) {+ return;+ }++ configuration_set_uint(settings, settings->uints.video_aspect_ratio_idx, isFullScreen ? ASPECT_RATIO_FULL : ASPECT_RATIO_CORE)++ command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL);+}+@endui_companion_driver_t ui_companion_cocoatouch = {diff --git a/ManicEmu/Libretro/LibretroConfig.xcconfig b/ManicEmu/Libretro/LibretroConfig.xcconfigindex 1c70eb69..b9fb6176 100644--- a/ManicEmu/Libretro/LibretroConfig.xcconfig+++ b/ManicEmu/Libretro/LibretroConfig.xcconfig@@ -118,7 +118,7 @@ OTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DHAVE_ONLINE_UPDATEROTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DHAVE_OPENGLESOTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DHAVE_OPENGLES3OTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DIOS-OTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DPACKAGE_VERSION=\"1.8.3\"+OTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DPACKAGE_VERSION=\"1.9.0\"OTHER_CFLAGS_IOS_TVOS_SHARE = $(inherited) -DRARCH_MOBILEOTHER_CFLAGS[sdk=iphoneos*] = $(inherited) $(OTHER_CFLAGS_IOS_TVOS_SHARE)diff --git a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj b/ManicEmu/ManicEmu.xcodeproj/project.pbxprojindex a216ad74..1b4a5eeb 100644--- a/ManicEmu/ManicEmu.xcodeproj/project.pbxproj+++ b/ManicEmu/ManicEmu.xcodeproj/project.pbxproj@@ -619,7 +619,7 @@5781F4992EEE71B500916D8B /* ShaderOrderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F4972EEE71A800916D8B /* ShaderOrderView.swift */; };5781F49E2EEE957200916D8B /* ShaderOrderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F49C2EEE956900916D8B /* ShaderOrderCell.swift */; };5781F4EB2EEFE44F00916D8B /* NumbersExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F4E92EEFE44800916D8B /* NumbersExtensions.swift */; };- 5781F5462EF1384500916D8B /* MeloNXKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F5442EF1383F00916D8B /* MeloNXKit.swift */; };+ 5781F5462EF1384500916D8B /* EmulatorInteractionKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F5442EF1383F00916D8B /* EmulatorInteractionKit.swift */; };5781F5AE2EF45C8200916D8B /* JGenesisView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5781F5AB2EF45C6900916D8B /* JGenesisView.swift */; };578F287E2F37805000D2D998 /* WFCSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 578F287C2F37804600D2D998 /* WFCSettingViewController.swift */; };578F28832F3780BC00D2D998 /* WFCSettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 578F28812F3780B700D2D998 /* WFCSettingView.swift */; };@@ -825,6 +825,7 @@57F2E9482DA289C2000E5BA6 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 57F2E9472DA289C2000E5BA6 /* OpenSSL */; };57F30CD82EC048880035327C /* ManufacturerCategoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F30CD62EC048780035327C /* ManufacturerCategoryView.swift */; };57F30CDF2EC44F390035327C /* Manufacturer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F30CDD2EC44F340035327C /* Manufacturer.swift */; };+ 57F3BAEC2F6541C900ABF4B3 /* J2MESettingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F3BAEA2F6541AB00ABF4B3 /* J2MESettingView.swift */; };57F632452D6D4A03007270E8 /* AddImportServiceCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F632442D6D4A02007270E8 /* AddImportServiceCollectionViewCell.swift */; };57F6327C2D6EA8D3007270E8 /* DropGlowEffectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F6327B2D6EA8BD007270E8 /* DropGlowEffectView.swift */; };57F632852D6EB485007270E8 /* UIScreenExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F632842D6EB47F007270E8 /* UIScreenExtensions.swift */; };@@ -842,6 +843,7 @@57FC198D2DF04E160076D93C /* right_eye_disabler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57FC198C2DF04E160076D93C /* right_eye_disabler.cpp */; };57FC19982DF051180076D93C /* hack_manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57FC19962DF051180076D93C /* hack_manager.cpp */; };57FC19992DF051180076D93C /* hack_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57FC19952DF051180076D93C /* hack_list.cpp */; };+ 57J2ME02F23397000EA24F1 /* J2ME.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57J2ME01F23397000EA24F1 /* J2ME.swift */; };A392D5652E96682C00F920E7 /* DisabledTapSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = A392D5632E96682600F920E7 /* DisabledTapSwitch.swift */; };A392D5B32E9796B900F920E7 /* ServiceIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A392D5B22E9796B800F920E7 /* ServiceIconView.swift */; };A3A043802E9BF57A006442C2 /* UIScrollViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3A0437F2E9BF57A006442C2 /* UIScrollViewExtensions.swift */; };@@ -1737,7 +1739,7 @@5781F4972EEE71A800916D8B /* ShaderOrderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderOrderView.swift; sourceTree = "<group>"; };5781F49C2EEE956900916D8B /* ShaderOrderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShaderOrderCell.swift; sourceTree = "<group>"; };5781F4E92EEFE44800916D8B /* NumbersExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NumbersExtensions.swift; sourceTree = "<group>"; };- 5781F5442EF1383F00916D8B /* MeloNXKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeloNXKit.swift; sourceTree = "<group>"; };+ 5781F5442EF1383F00916D8B /* EmulatorInteractionKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmulatorInteractionKit.swift; sourceTree = "<group>"; };5781F5AB2EF45C6900916D8B /* JGenesisView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JGenesisView.swift; sourceTree = "<group>"; };578F287C2F37804600D2D998 /* WFCSettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WFCSettingViewController.swift; sourceTree = "<group>"; };578F28812F3780B700D2D998 /* WFCSettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WFCSettingView.swift; sourceTree = "<group>"; };@@ -1936,6 +1938,7 @@57F1A9382D7D703500D0CC93 /* AirPlayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirPlayViewController.swift; sourceTree = "<group>"; };57F30CD62EC048780035327C /* ManufacturerCategoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManufacturerCategoryView.swift; sourceTree = "<group>"; };57F30CDD2EC44F340035327C /* Manufacturer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Manufacturer.swift; sourceTree = "<group>"; };+ 57F3BAEA2F6541AB00ABF4B3 /* J2MESettingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = J2MESettingView.swift; sourceTree = "<group>"; };57F456CF2DA98BB8007203AF /* Config-DevRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Config-DevRelease.xcconfig"; sourceTree = "<group>"; };57F632442D6D4A02007270E8 /* AddImportServiceCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddImportServiceCollectionViewCell.swift; sourceTree = "<group>"; };57F6327B2D6EA8BD007270E8 /* DropGlowEffectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropGlowEffectView.swift; sourceTree = "<group>"; };@@ -1951,6 +1954,7 @@57FC198C2DF04E160076D93C /* right_eye_disabler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = right_eye_disabler.cpp; sourceTree = "<group>"; };57FC19952DF051180076D93C /* hack_list.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = hack_list.cpp; sourceTree = "<group>"; };57FC19962DF051180076D93C /* hack_manager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = hack_manager.cpp; sourceTree = "<group>"; };+ 57J2ME01F23397000EA24F1 /* J2ME.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = J2ME.swift; sourceTree = "<group>"; };5D42AD15F67D97D2A7EF83B9 /* Pods-ManicEmu.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ManicEmu.release.xcconfig"; path = "Target Support Files/Pods-ManicEmu/Pods-ManicEmu.release.xcconfig"; sourceTree = "<group>"; };7436F3E00AF2863DB4D7DBA6 /* Pods-ManicEmu.debugsimulator.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ManicEmu.debugsimulator.xcconfig"; path = "Target Support Files/Pods-ManicEmu/Pods-ManicEmu.debugsimulator.xcconfig"; sourceTree = "<group>"; };8716E0FB35012D3F5C750B94 /* Pods-ManicEmu.devrelease.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ManicEmu.devrelease.xcconfig"; path = "Target Support Files/Pods-ManicEmu/Pods-ManicEmu.devrelease.xcconfig"; sourceTree = "<group>"; };@@ -3938,6 +3942,7 @@57913B432D5ED727004D51AA /* VIews */ = {isa = PBXGroup;children = (+ 57F3BAEA2F6541AB00ABF4B3 /* J2MESettingView.swift */,57399ACE2E40BB4400AB73DD /* PSXSBIDescCollectionCell.swift */,57399AC72E40AFB100AB73DD /* PSXSBICollectionCell.swift */,576F0E042D88005800D2A1BA /* GameSavePurchaseGuideView.swift */,@@ -4269,6 +4274,7 @@57F0D8402DE2CD7500760F57 /* Cores */ = {isa = PBXGroup;children = (+ 57J2ME01F23397000EA24F1 /* J2ME.swift */,573CEE952F23396C00EA24F1 /* Lynx.swift */,573CEE902F23396200EA24F1 /* Jaguar.swift */,573CEE882F2338D500EA24F1 /* A7800.swift */,@@ -4521,7 +4527,7 @@57A912022F3B765B00628B04 /* NDSSaveConverter.swift */,578F28C02F39A9CA00D2D998 /* BonjourKit.swift */,573CEE112F20D46B00EA24F1 /* LocalWebServer.swift */,- 5781F5442EF1383F00916D8B /* MeloNXKit.swift */,+ 5781F5442EF1383F00916D8B /* EmulatorInteractionKit.swift */,57B5E3222ECCCD0100DE17E9 /* MAMEKit.swift */,5771C1A72E6207650062EDE0 /* MobyGamesKit.swift */,5744C6CE2E360AD50088081A /* UIControllerKit.swift */,@@ -5410,6 +5416,7 @@57DF840C2D61B3D500AA0AAB /* BlankSlateCollectionView.swift in Sources */,575FF8E82D34A6DF0043B2F3 /* System.swift in Sources */,573CEE962F23396D00EA24F1 /* Lynx.swift in Sources */,+ 57J2ME02F23397000EA24F1 /* J2ME.swift in Sources */,57DE104E2D6088BE00CDD82A /* BlankPlaceholderView.swift in Sources */,57E962F82D6AB4540022914C /* PlayHistoryItemCollectionCell.swift in Sources */,57CCB33B2D6584BC0036476B /* ObjectUpdatable.swift in Sources */,@@ -5625,13 +5632,14 @@A392D5652E96682C00F920E7 /* DisabledTapSwitch.swift in Sources */,57F632852D6EB485007270E8 /* UIScreenExtensions.swift in Sources */,57B6ECC92D797CA3002E619C /* AddCheatCodeTitleCell.swift in Sources */,- 5781F5462EF1384500916D8B /* MeloNXKit.swift in Sources */,+ 5781F5462EF1384500916D8B /* EmulatorInteractionKit.swift in Sources */,5706B0402DFBEC300066122E /* MS.swift in Sources */,A5A001F324555A5F006E0F0E /* AppDelegate.swift in Sources */,575A39CE2DCD011500B28FC2 /* OnlineCoverManager.swift in Sources */,57B6ECEC2D79E19E002E619C /* BlankSlateTableView.swift in Sources */,5720D1C32DBA01990090C0F6 /* MappingTipView.swift in Sources */,57E0C19E2D562F8600962555 /* GamesToolView.swift in Sources */,+ 57F3BAEC2F6541C900ABF4B3 /* J2MESettingView.swift in Sources */,57D7CF8B2EA8C8A000F41540 /* TriggerProMappingListView.swift in Sources */,57DF847A2D62E98100AA0AAB /* NSAttributedStringExtensions.swift in Sources */,576F0DA52D85CD3A00D2A1BA /* FeaturesCell.swift in Sources */,diff --git a/ManicEmu/ManicEmu.xcodeproj/xcshareddata/xcschemes/ManicEmu.xcscheme b/ManicEmu/ManicEmu.xcodeproj/xcshareddata/xcschemes/ManicEmu.xcschemeindex afc6f72d..c03c91b3 100644--- a/ManicEmu/ManicEmu.xcodeproj/xcshareddata/xcschemes/ManicEmu.xcscheme+++ b/ManicEmu/ManicEmu.xcodeproj/xcshareddata/xcschemes/ManicEmu.xcscheme@@ -82,7 +82,7 @@buildConfiguration = "Debug"></AnalyzeAction><ArchiveAction- buildConfiguration = "Release"+ buildConfiguration = "SideloadRelease"revealArchiveInOrganizer = "YES"></ArchiveAction></Scheme>diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/Contents.jsonnew file mode 100644index 00000000..73c00596--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/Contents.json@@ -0,0 +1,6 @@+{+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/arcade_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/arcade_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/atari_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/atari_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/Contents.jsonnew file mode 100644index 00000000..6801a729--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/Contents.json@@ -0,0 +1,54 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected]new file mode 100644index 00000000..d5a2b2b6Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected]new file mode 100644index 00000000..d611b926Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected]new file mode 100644index 00000000..8e1cf414Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected]new file mode 100644index 00000000..78b4ce7cBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/Contents.jsonnew file mode 100644index 00000000..3c921840--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/Contents.json@@ -0,0 +1,54 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected]new file mode 100644index 00000000..d6e212adBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected]new file mode 100644index 00000000..7ed752bfBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected]new file mode 100644index 00000000..9a1edbd3Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected]new file mode 100644index 00000000..dec7cc57Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/microsoft_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/nintendo_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/nintendo_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_highlight.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_highlight.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/Contents.jsonsimilarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/Contents.jsonrename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/Contents.jsondiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]similarity index 100%rename from ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/sony_normal.imageset/[email protected]rename to ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sony_normal.imageset/[email protected]diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/Contents.jsonnew file mode 100644index 00000000..dcc7321a--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/Contents.json@@ -0,0 +1,54 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected]new file mode 100644index 00000000..dffdc25bBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected]new file mode 100644index 00000000..dffcc0b4Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected]new file mode 100644index 00000000..dffdc25bBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected]new file mode 100644index 00000000..24424c78Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_highlight.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/Contents.jsonnew file mode 100644index 00000000..ebe14630--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/Contents.json@@ -0,0 +1,54 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ },+ {+ "appearances" : [+ {+ "appearance" : "luminosity",+ "value" : "dark"+ }+ ],+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected]new file mode 100644index 00000000..5703e28aBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected]new file mode 100644index 00000000..66e36ef8Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected]new file mode 100644index 00000000..0d07be33Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected]new file mode 100644index 00000000..47643984Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/Manufacturer/sun_normal.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/Contents.jsonnew file mode 100644index 00000000..bd86f7d4--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected]new file mode 100644index 00000000..4be2d331Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected]new file mode 100644index 00000000..74ba96b1Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/j2me_group_brand.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/Contents.jsonnew file mode 100644index 00000000..876ab9ed--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected]new file mode 100644index 00000000..3f6f3275Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected]new file mode 100644index 00000000..893fc9b3Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/brand/xbox360_group_brand.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/Contents.jsonnew file mode 100644index 00000000..6ff58bcc--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected]new file mode 100644index 00000000..c6422c8bBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected]new file mode 100644index 00000000..f1fc0adaBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_h.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/Contents.jsonnew file mode 100644index 00000000..e266e2e7--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected]new file mode 100644index 00000000..cd68878aBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected]new file mode 100644index 00000000..7b02d2d4Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/j2me_cover_v.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/Contents.jsonnew file mode 100644index 00000000..72174d63--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected]new file mode 100644index 00000000..32f11495Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected]new file mode 100644index 00000000..cba0dae1Binary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_h.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/Contents.jsonnew file mode 100644index 00000000..dac3ae82--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/Contents.json@@ -0,0 +1,22 @@+{+ "images" : [+ {+ "idiom" : "universal",+ "scale" : "1x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "2x"+ },+ {+ "filename" : "[email protected]",+ "idiom" : "universal",+ "scale" : "3x"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected]new file mode 100644index 00000000..a2b4932fBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected] b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected]new file mode 100644index 00000000..4bfa6edcBinary files /dev/null and b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Images/cover/xbox360_cover_v.imageset/[email protected] differdiff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/Contents.jsonnew file mode 100644index 00000000..b682355c--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/Contents.json@@ -0,0 +1,12 @@+{+ "info" : {+ "author" : "xcode",+ "version" : 1+ },+ "symbols" : [+ {+ "filename" : "custom.arrow.up.left.and.arrow.down.right.square.svg",+ "idiom" : "universal"+ }+ ]+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/custom.arrow.up.left.and.arrow.down.right.square.svg b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/custom.arrow.up.left.and.arrow.down.right.square.svgnew file mode 100644index 00000000..da1a955f--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.arrow.up.left.and.arrow.down.right.square.symbolset/custom.arrow.up.left.and.arrow.down.right.square.svg@@ -0,0 +1,109 @@+<?xml version="1.0" encoding="UTF-8"?>+<!--Generator: Apple Native CoreSVG 341-->+<!DOCTYPE svg+PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 3300 2200">+ <!--glyph: "", point size: 100.0, font version: "21.0d6e2", template writer version: "138.0.0"-->+ <style>.defaults {-sfsymbols-wiggle-style:linear;-sfsymbols-wiggle-angle:-135;-sfsymbols-draw-reverses-motion-groups:true}++.monochrome-0 {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:86c80963876e150 _enclosure.stroke arrow.up.left.and.arrow.down.right.square square}+.monochrome-1 {-sfsymbols-motion-group:0;-sfsymbols-always-pulses:true;-sfsymbols-layer-tags:86c80963876e150 arrow.up.left.and.arrow.down.right.square}++.multicolor-0:tintColor {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:86c80963876e150 _enclosure.stroke arrow.up.left.and.arrow.down.right.square square}+.multicolor-1:tintColor {-sfsymbols-motion-group:0;-sfsymbols-always-pulses:true;-sfsymbols-layer-tags:86c80963876e150 arrow.up.left.and.arrow.down.right.square}++.hierarchical-0:secondary {-sfsymbols-motion-group:1;-sfsymbols-layer-tags:86c80963876e150 _enclosure.stroke arrow.up.left.and.arrow.down.right.square square}+.hierarchical-1:primary {-sfsymbols-motion-group:0;-sfsymbols-always-pulses:true;-sfsymbols-layer-tags:86c80963876e150 arrow.up.left.and.arrow.down.right.square}++.SFSymbolsPreviewWireframe {fill:none;opacity:1.0;stroke:black;stroke-width:0.5}+</style>+ <g id="Notes">+ <rect height="2200" id="artboard" style="fill:white;opacity:1" width="3300" x="0" y="0"/>+ <line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>+ <line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>+ <g transform="matrix(0.2 0 0 0.2 263 1933)">+ <path d="m46.2402 4.15039c21.7773 0 39.4531-17.627 39.4531-39.4043s-17.6758-39.4043-39.4531-39.4043c-21.7285 0-39.4043 17.627-39.4043 39.4043s17.6758 39.4043 39.4043 39.4043Zm0-7.42188c-17.6758 0-31.9336-14.3066-31.9336-31.9824s14.2578-31.9824 31.9336-31.9824 31.9824 14.3066 31.9824 31.9824-14.3066 31.9824-31.9824 31.9824Zm3.61328-17.7734v-28.4668c0-2.24609-1.46484-3.75977-3.71094-3.75977-2.14844 0-3.61328 1.51367-3.61328 3.75977v28.4668c0 2.19727 1.46484 3.71094 3.61328 3.71094 2.24609 0 3.71094-1.51367 3.71094-3.71094Zm-17.8223-10.5957h28.418c2.19727 0 3.71094-1.46484 3.71094-3.61328 0-2.19727-1.51367-3.71094-3.71094-3.71094h-28.418c-2.24609 0-3.75977 1.51367-3.75977 3.71094 0 2.14844 1.51367 3.61328 3.75977 3.61328Z"/>+ </g>+ <g transform="matrix(0.2 0 0 0.2 281.506 1933)">+ <path d="m58.5449 14.5508c27.4902 0 49.8047-22.3145 49.8047-49.8047s-22.3145-49.8047-49.8047-49.8047-49.8047 22.3145-49.8047 49.8047 22.3145 49.8047 49.8047 49.8047Zm0-8.30078c-22.9492 0-41.5039-18.5547-41.5039-41.5039s18.5547-41.5039 41.5039-41.5039 41.5039 18.5547 41.5039 41.5039-18.5547 41.5039-41.5039 41.5039Zm4.05273-23.0957v-36.9141c0-2.49023-1.70898-4.19922-4.15039-4.19922-2.39258 0-4.05273 1.70898-4.05273 4.19922v36.9141c0 2.44141 1.66016 4.15039 4.05273 4.15039 2.44141 0 4.15039-1.66016 4.15039-4.15039Zm-22.5586-14.4043h36.9629c2.44141 0 4.15039-1.61133 4.15039-4.00391 0-2.44141-1.70898-4.15039-4.15039-4.15039h-36.9629c-2.49023 0-4.15039 1.70898-4.15039 4.15039 0 2.39258 1.66016 4.00391 4.15039 4.00391Z"/>+ </g>+ <g transform="matrix(0.2 0 0 0.2 304.924 1933)">+ <path d="m74.8535 28.3203c35.1074 0 63.623-28.4668 63.623-63.5742s-28.5156-63.623-63.623-63.623-63.5742 28.5156-63.5742 63.623 28.4668 63.5742 63.5742 63.5742Zm0-9.08203c-30.127 0-54.4922-24.3652-54.4922-54.4922s24.3652-54.4922 54.4922-54.4922 54.4922 24.3652 54.4922 54.4922-24.3652 54.4922-54.4922 54.4922Zm4.44336-30.3223v-48.4863c0-2.73438-1.85547-4.63867-4.54102-4.63867-2.58789 0-4.44336 1.9043-4.44336 4.63867v48.4863c0 2.68555 1.85547 4.58984 4.44336 4.58984 2.68555 0 4.54102-1.85547 4.54102-4.58984Zm-28.7109-19.7754h48.4863c2.68555 0 4.58984-1.80664 4.58984-4.39453 0-2.73438-1.85547-4.58984-4.58984-4.58984h-48.4863c-2.73438 0-4.58984 1.85547-4.58984 4.58984 0 2.58789 1.85547 4.39453 4.58984 4.39453Z"/>+ </g>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>+ <line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>+ <g transform="matrix(0.2 0 0 0.2 776 1933)">+ <path d="m16.5527 0.78125c2.58789 0 3.85742-0.976562 4.78516-3.71094l20.5566-57.5195h0.244141l20.6055 57.5195c0.927734 2.73438 2.19727 3.71094 4.73633 3.71094 2.58789 0 4.24805-1.5625 4.24805-4.00391 0-0.830078-0.146484-1.61133-0.537109-2.63672l-22.9004-60.9863c-1.12305-2.97852-3.125-4.49219-6.25-4.49219-3.02734 0-5.07812 1.46484-6.15234 4.44336l-22.9004 61.084c-0.390625 1.02539-0.537109 1.80664-0.537109 2.63672 0 2.44141 1.5625 3.95508 4.10156 3.95508Zm10.2051-20.9473h30.6641c2.00195 0 3.66211-1.66016 3.66211-3.66211 0-2.05078-1.66016-3.66211-3.66211-3.66211h-30.6641c-2.00195 0-3.66211 1.61133-3.66211 3.66211 0 2.00195 1.66016 3.66211 3.66211 3.66211Z"/>+ </g>+ <line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="792.836" x2="792.836" y1="1919" y2="1933"/>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>+ <g transform="matrix(0.2 0 0 0.2 1289 1933)">+ <path d="m14.209 13.1348 7.86133 7.86133c4.29688 4.39453 9.32617 4.10156 13.8672-1.02539l60.6934-68.2129-4.88281-4.88281-60.2539 67.6758c-1.80664 1.95312-3.4668 2.44141-5.81055 0.0976562l-5.17578-5.12695c-2.29492-2.29492-1.80664-3.95508 0.195312-5.81055l67.4805-62.1582-4.88281-4.83398-68.0664 62.5977c-4.98047 4.58984-5.32227 9.47266-1.02539 13.8184Zm44.873-97.4609c-2.05078 2.00195-2.24609 4.88281-1.07422 6.78711 1.12305 1.80664 3.4668 3.02734 6.5918 2.24609 5.85938-1.66016 12.5977-2.39258 18.8965 0.927734l-2.68555 7.12891c-1.61133 4.00391-0.732422 6.88477 1.70898 9.42383l10.2539 10.3027c2.34375 2.39258 4.54102 2.44141 7.08008 1.95312l4.44336-0.732422 2.58789 2.53906-0.195312 2.24609c-0.0976562 2.29492 0.537109 4.29688 2.7832 6.49414l3.36914 3.32031c2.29492 2.29492 5.51758 2.49023 7.8125 0.195312l12.9883-13.0371c2.29492-2.34375 2.14844-5.37109-0.195312-7.66602l-3.41797-3.41797c-2.19727-2.19727-4.05273-3.02734-6.34766-2.88086l-2.34375 0.244141-2.44141-2.44141 1.02539-4.6875c0.634766-2.73438-0.244141-4.98047-2.88086-7.61719l-11.2793-11.1816c-12.9395-12.8418-35.5957-11.0352-46.6797-0.146484Zm7.08008 2.05078c8.78906-6.39648 25.9766-5.66406 33.6914 1.95312l12.3047 12.207c1.02539 1.02539 1.2207 1.80664 0.927734 3.32031l-1.46484 6.64062 6.73828 6.68945 4.39453-0.244141c1.12305-0.0488281 1.51367 0.0488281 2.34375 0.878906l2.53906 2.49023-10.8398 10.8398-2.49023-2.49023c-0.830078-0.878906-0.976562-1.2207-0.927734-2.39258l0.292969-4.3457-6.68945-6.73828-6.83594 1.17188c-1.41602 0.292969-2.05078 0.195312-3.17383-0.878906l-8.93555-8.88672c-1.07422-1.02539-1.17188-1.70898-0.488281-3.36914l4.58984-11.4746c-6.10352-6.34766-17.041-7.51953-25.5859-4.58984-0.683594 0.244141-0.927734-0.390625-0.390625-0.78125Z"/>+ </g>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>+ <text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.7.0</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 17 or greater</text>+ <text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from custom.arrow.up.left.and.arrow.down.right.square</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100.0 points</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1156)">Medium</text>+ <text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1586)">Large</text>+ </g>+ <g id="Guides">+ <g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)">+ <path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>+ </g>+ <line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="696" y2="696"/>+ <line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="625.541" y2="625.541"/>+ <g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)">+ <path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>+ </g>+ <line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1126" y2="1126"/>+ <line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/>+ <g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)">+ <path d="M0.993654 0L3.63775 0L29.3281-67.1323L30.0303-67.1323L30.0303-70.459L28.1226-70.459ZM11.6885-24.4799L46.9815-24.4799L46.2315-26.7285L12.4385-26.7285ZM55.1196 0L57.7637 0L30.6382-70.459L29.4326-70.459L29.4326-67.1323Z"/>+ </g>+ <line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1556" y2="1556"/>+ <line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/>+ <line id="right-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2981.3" x2="2981.3" y1="600.785" y2="720.121"/>+ <line id="left-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2885.5" x2="2885.5" y1="600.785" y2="720.121"/>+ <line id="right-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1495.18" x2="1495.18" y1="600.785" y2="720.121"/>+ <line id="left-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1404.51" x2="1404.51" y1="600.785" y2="720.121"/>+ <line id="right-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="603.073" x2="603.073" y1="600.785" y2="720.121"/>+ <line id="left-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="516.35" x2="516.35" y1="600.785" y2="720.121"/>+ </g>+ <g id="Symbols">+ <g id="Black-S" transform="matrix(1 0 0 1 2885.5 696)">+ <path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M25 2.88086L70.8008 2.88086C80.3711 2.88086 86.0352-2.7832 86.0352-12.3535L86.0352-58.1543C86.0352-67.7246 80.3711-73.3887 70.8008-73.3887L25-73.3887C15.4297-73.3887 9.76562-67.7246 9.76562-58.1543L9.76562-12.3535C9.76562-2.7832 15.4297 2.88086 25 2.88086ZM27.2461-11.2793C25-11.2793 23.9258-12.1582 23.9258-14.5996L23.9258-55.9082C23.9258-58.3496 25-59.2285 27.2461-59.2285L68.5547-59.2285C70.8008-59.2285 71.875-58.3496 71.875-55.9082L71.875-14.5996C71.875-12.1582 70.8008-11.2793 68.5547-11.2793Z" data-clipstroke-keyframes="0 4 0 0.5813327 1.389793 0 0.07528441 0.50604826 1.5011075 0 0.17582981 0.40550286 1.5288503 0 0.32401118 0.2573215 1.7503045 0 0.42503396 0.15629871 1.7775068 0 0.5724195 0.008913165 1.9978433 0 0.67710304 0.90422964 1.0304487 0 0.8225786 0.7587541 1.248706 0 0.9282172 0.6531155 1.2821741 0 1 0.5813327 1.3893616"/>+ <path class="monochrome-1 multicolor-1:tintColor hierarchical-1:primary SFSymbolsPreviewWireframe" d="M32.5195-33.8379C34.668-33.8379 36.4258-35.5469 36.4258-37.7441L36.4258-38.8672L35.6934-41.3086L40.1855-36.1816C41.8457-34.2773 44.9219-34.375 46.7773-36.1816C48.584-38.0371 48.7305-41.0645 46.7773-42.7734L41.6504-47.2168L44.1895-46.4844L45.2148-46.4844C47.3633-46.4844 49.1211-48.1934 49.1211-50.3906C49.1211-52.5391 47.3633-54.2969 45.2148-54.2969L34.1797-54.2969C30.5176-54.2969 28.6133-52.2461 28.6133-48.7793L28.6133-37.7441C28.6133-35.5469 30.3711-33.8379 32.5195-33.8379ZM50.293-16.1133L61.3281-16.1133C64.9902-16.1133 66.8945-18.1641 66.8945-21.6309L66.8945-32.666C66.8945-34.8633 65.1367-36.5723 62.9883-36.5723C60.8398-36.5723 59.082-34.8633 59.082-32.666L59.082-31.543L59.8145-29.1016L55.3223-34.2285C53.6621-36.1328 50.5859-36.0352 48.7305-34.2285C46.9238-32.373 46.7773-29.3457 48.7305-27.6367L53.8574-23.1934L51.3184-23.9258L50.293-23.9258C48.1445-23.9258 46.3867-22.2168 46.3867-20.0195C46.3867-17.8711 48.1445-16.1133 50.293-16.1133Z"/>+ </g>+ <g id="Regular-S" transform="matrix(1 0 0 1 1404.51 696)">+ <path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M22.2168 0.390625L68.457 0.390625C76.8066 0.390625 80.9082-3.71094 80.9082-11.9141L80.9082-58.4961C80.9082-66.6992 76.8066-70.8008 68.457-70.8008L22.2168-70.8008C13.916-70.8008 9.76562-66.6992 9.76562-58.4961L9.76562-11.9141C9.76562-3.71094 13.916 0.390625 22.2168 0.390625ZM22.3145-6.68945C18.7988-6.68945 16.7969-8.59375 16.7969-12.2559L16.7969-58.1543C16.7969-61.8652 18.7988-63.7207 22.3145-63.7207L68.3594-63.7207C71.875-63.7207 73.877-61.8652 73.877-58.1543L73.877-12.2559C73.877-8.59375 71.875-6.68945 68.3594-6.68945Z" data-clipstroke-keyframes="0 4 0 0.58711904 1.3950016 0 0.086905584 0.50021344 1.5001874 0 0.16366951 0.42344952 1.5405744 0 0.33756852 0.2495505 1.7510426 0 0.4134776 0.17364143 1.790225 0 0.58372426 0.0033947495 1.9963158 0 0.6650376 0.9220815 1.0419437 0 0.83534575 0.7517733 1.2484163 0 0.9139431 0.67317593 1.2908218 0 1 0.58711904 1.3950016"/>+ <path class="monochrome-1 multicolor-1:tintColor hierarchical-1:primary SFSymbolsPreviewWireframe" d="M28.7109-34.7168C30.4199-34.7168 31.7871-36.084 31.7871-37.7441L31.7871-39.3555L31.2988-45.2148L39.0137-37.0117C40.2832-35.6445 42.3828-35.6934 43.6523-36.9629C44.9219-38.2324 44.873-40.3809 43.6035-41.6016L35.498-49.2188L41.2109-48.7793L42.7246-48.7793C44.3848-48.7793 45.752-50.1465 45.752-51.8066C45.752-53.5156 44.3848-54.8828 42.7246-54.8828L29.2969-54.8828C27.002-54.8828 25.6836-53.9062 25.6836-51.2695L25.6836-37.7441C25.6836-36.084 27.0508-34.7168 28.7109-34.7168ZM47.998-15.4785L61.4258-15.4785C63.7207-15.4785 65.0391-16.5039 65.0391-19.0918L65.0391-32.6172C65.0391-34.3262 63.6719-35.6934 61.9629-35.6934C60.2539-35.6934 58.8867-34.3262 58.8867-32.6172L58.8867-31.0059L59.375-25.1953L51.6602-33.3496C50.3906-34.7168 48.3398-34.668 47.0703-33.3984C45.8008-32.1289 45.8496-30.0293 47.1191-28.8086L55.1758-21.1426L49.4629-21.582L47.998-21.582C46.2891-21.582 44.9219-20.2637 44.9219-18.5547C44.9219-16.8457 46.2891-15.4785 47.998-15.4785Z"/>+ </g>+ <g id="Ultralight-S" transform="matrix(1 0 0 1 516.35 696)">+ <path class="monochrome-0 multicolor-0:tintColor hierarchical-0:secondary SFSymbolsPreviewWireframe" d="M19.7647-1.65282L66.9585-1.65282C73.4917-1.65282 76.9576-5.20946 76.9576-11.6416L76.9576-58.8594C76.9576-65.2915 73.4917-68.8482 66.9585-68.8482L19.7647-68.8482C13.2349-68.8482 9.76562-65.3823 9.76562-58.8594L9.76562-11.6416C9.76562-5.11864 13.2349-1.65282 19.7647-1.65282ZM19.8623-3.87405C14.6665-3.87405 11.9834-6.55031 11.9834-11.7564L11.9834-58.7446C11.9834-63.9541 14.6665-66.6269 19.8623-66.6269L66.8609-66.6269C71.875-66.6269 74.7397-63.9541 74.7397-58.7446L74.7397-11.7564C74.7397-6.55031 71.875-3.87405 66.8609-3.87405Z" data-clipstroke-keyframes="0 4 0 0.5928534 1.4020303 0 0.092570975 0.50028247 1.5003023 0 0.15646498 0.43638846 1.5529217 0 0.34257752 0.2502759 1.7503245 0 0.406984 0.18586943 1.8031948 0 0.58921605 0.0036373662 1.9965427 0 0.6582512 0.9346022 1.0545796 0 0.84130377 0.75154966 1.2489141 0 0.90742904 0.6854244 1.3038812 0 1 0.5928534 1.4016461"/>+ <path class="monochrome-1 multicolor-1:tintColor hierarchical-1:primary SFSymbolsPreviewWireframe" d="M27.2578-37.8047C27.877-37.8047 28.336-38.3091 28.336-38.9248L28.336-41.9438L28.3018-49.0293L39.1045-37.9653C39.6021-37.5063 40.294-37.5098 40.7461-37.9619C41.1529-38.4141 41.1494-39.1094 40.7427-39.5581L29.6856-50.3994L36.2159-50.3686L39.8184-50.3232C40.3887-50.3232 40.8931-50.7822 40.8931-51.398C40.8931-51.9717 40.3887-52.4761 39.8184-52.4761L27.2988-52.4761C26.6841-52.4761 26.1831-52.0444 26.1831-51.3604L26.1831-38.9248C26.1831-38.3091 26.6875-37.8047 27.2578-37.8047ZM46.9082-18.1577L59.4278-18.1577C60.0425-18.1577 60.5435-18.5928 60.5435-19.2734L60.5435-31.7544C60.5435-32.3281 60.0391-32.8325 59.4654-32.8325C58.8462-32.8325 58.3872-32.3281 58.3872-31.7544L58.3872-28.69L58.4668-21.6079L47.6187-32.6685C47.1211-33.1275 46.4326-33.124 45.9805-32.6719C45.5737-32.2197 45.5772-31.5278 45.9839-31.0791L57.0376-20.2798L50.5527-20.2651L46.9082-20.3106C46.3345-20.3106 45.8301-19.855 45.8301-19.2358C45.8301-18.6621 46.3345-18.1577 46.9082-18.1577Z"/>+ </g>+ </g>+</svg>diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/Contents.json b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/Contents.jsonnew file mode 100644index 00000000..779a481b--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/Contents.json@@ -0,0 +1,12 @@+{+ "info" : {+ "author" : "xcode",+ "version" : 1+ },+ "symbols" : [+ {+ "filename" : "custom.java.svg",+ "idiom" : "universal"+ }+ ]+}diff --git a/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/custom.java.svg b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/custom.java.svgnew file mode 100644index 00000000..3ad9b9ac--- /dev/null+++ b/ManicEmu/ManicEmu/Resources/Assets.xcassets/Symbols/custom.java.symbolset/custom.java.svg@@ -0,0 +1,46 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg height="600" width="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">+ <g id="Notes" font-family="'LucidaGrande', 'Lucida Grande', sans-serif" font-size="13">+ <rect fill="white" height="600.0" width="800.0" x="0.0" y="0.0" />+ <g font-size="13">+ <text x="18.0" y="176.0">Small</text>+ <text x="18.0" y="376.0">Medium</text>+ <text x="18.0" y="576.0">Large</text>+ </g>+ <g font-size="9">+ <text x="250.0" y="30.0">Ultralight</text>+ <text x="450.0" y="30.0">Regular</text>+ <text x="650.0" y="30.0">Black</text>+ <text id="template-version" fill="#505050" text-anchor="end" x="785.0" y="575.0">Template v.3.0</text>+ <a href="https://wangchujiang.com/#/app">+ <text fill="#505050" text-anchor="end" x="785.0" y="590.0">https://wangchujiang.com/#/app</text>+ </a>+ </g>+ </g>+ <g id="Guides" stroke="rgb(39, 170, 225)" stroke-width="0.5">+ <path id="Capline-S" d="M18,76 l800,0" />+ <path id="H-reference" d="M85,145.755 L87.685,145.755 L113.369,79.287 L114.052,79.287 L114.052,76 L112.148,76 L85,145.755 Z M95.693,121.536 L130.996,121.536 L130.263,119.313 L96.474,119.313 L95.693,121.536 Z M139.15,145.755 L141.787,145.755 L114.638,76 L113.466,76 L113.466,79.287 L139.15,145.755 Z" stroke="none" />+ <path id="Baseline-S" d="M18,146 l800,0" />+ <path id="left-margin-Ultralight-S" d="M221,56 l0,110" />+ <path id="right-margin-Ultralight-S" d="M309,56 l0,110" />+ <path id="left-margin-Regular-S" d="M421,56 l0,110" />+ <path id="right-margin-Regular-S" d="M509,56 l0,110" />+ <path id="left-margin-Black-S" d="M621,56 l0,110" />+ <path id="right-margin-Black-S" d="M709,56 l0,110" />+ <path id="Capline-M" d="M18,276 l800,0" />+ <path id="Baseline-M" d="M18,346 l800,0" />+ <path id="Capline-L" d="M18,476 l800,0" />+ <path id="Baseline-L" d="M18,546 l800,0" />+ </g>+ <g id="Symbols">+ <g id="Ultralight-S">+ <path d="M269.376,76 C273.152,84.909 255.839,90.368 254.229,97.794 C252.757,104.609 264.485,112.603 264.495,112.603 C262.707,109.784 261.403,107.407 259.615,103.011 C256.585,95.585 278.074,88.885 269.376,76 Z M280.819,88.369 C280.819,88.369 265.684,89.327 264.916,99.224 C264.569,103.631 268.913,105.945 269.039,109.153 C269.144,111.772 266.43,113.95 266.43,113.95 C266.43,113.95 271.3,113.066 272.826,109.069 C274.508,104.63 269.544,101.601 270.049,98.046 C270.533,94.649 280.819,88.369 280.819,88.369 Z M284.522,111.173 C282.933,111.099 281.145,111.688 279.557,112.856 C282.692,112.161 285.363,114.128 285.363,116.39 C285.363,121.459 278.127,126.235 278.127,126.235 C278.127,126.235 289.318,124.983 289.318,116.642 C289.318,113.203 287.162,111.299 284.522,111.173 Z M254.818,111.257 C250.916,111.394 243.122,112.035 243.122,115.043 C243.122,119.23 261.277,119.556 274.256,116.979 C274.256,116.979 277.79,114.517 278.716,113.613 C270.206,115.38 250.779,115.653 250.779,114.118 C250.779,112.708 257.006,111.257 257.006,111.257 C257.006,111.257 256.123,111.215 254.818,111.257 Z M253.64,118.998 C251.505,118.998 248.339,120.66 248.339,122.28 C248.339,125.541 264.411,128.044 276.275,123.29 L272.152,120.765 C264.106,123.395 249.244,122.522 253.64,118.998 Z M255.66,126.319 C252.746,126.319 250.864,128.16 250.864,129.516 C250.864,133.692 268.271,134.102 275.182,129.853 L270.806,126.992 C265.652,129.211 252.683,129.537 255.66,126.319 Z M245.899,130.105 C241.145,130.011 238.074,132.167 238.074,133.976 C238.074,143.6 286.794,143.137 286.794,133.303 C286.794,131.673 284.869,130.894 284.185,130.526 C288.161,139.929 244.384,139.193 244.384,133.639 C244.384,132.377 247.624,131.115 250.611,131.704 L248.087,130.274 C247.34,130.158 246.583,130.116 245.899,130.105 Z M291.926,136.585 C284.522,143.747 265.778,146.314 246.909,141.886 C265.778,149.774 291.832,145.388 291.926,136.585 Z" />+ </g>+ <g id="Regular-S">+ <path d="M469.376,76 C473.152,84.909 455.839,90.368 454.229,97.794 C452.757,104.609 464.485,112.603 464.495,112.603 C462.707,109.784 461.403,107.407 459.615,103.011 C456.585,95.585 478.074,88.885 469.376,76 Z M480.819,88.369 C480.819,88.369 465.684,89.327 464.916,99.224 C464.569,103.631 468.913,105.945 469.039,109.153 C469.144,111.772 466.43,113.95 466.43,113.95 C466.43,113.95 471.3,113.066 472.826,109.069 C474.508,104.63 469.544,101.601 470.049,98.046 C470.533,94.649 480.819,88.369 480.819,88.369 Z M484.522,111.173 C482.933,111.099 481.145,111.688 479.557,112.856 C482.692,112.161 485.363,114.128 485.363,116.39 C485.363,121.459 478.127,126.235 478.127,126.235 C478.127,126.235 489.318,124.983 489.318,116.642 C489.318,113.203 487.162,111.299 484.522,111.173 Z M454.818,111.257 C450.916,111.394 443.122,112.035 443.122,115.043 C443.122,119.23 461.277,119.556 474.256,116.979 C474.256,116.979 477.79,114.517 478.716,113.613 C470.206,115.38 450.779,115.653 450.779,114.118 C450.779,112.708 457.006,111.257 457.006,111.257 C457.006,111.257 456.123,111.215 454.818,111.257 Z M453.64,118.998 C451.505,118.998 448.339,120.66 448.339,122.28 C448.339,125.541 464.411,128.044 476.275,123.29 L472.152,120.765 C464.106,123.395 449.244,122.522 453.64,118.998 Z M455.66,126.319 C452.746,126.319 450.864,128.16 450.864,129.516 C450.864,133.692 468.271,134.102 475.182,129.853 L470.806,126.992 C465.652,129.211 452.683,129.537 455.66,126.319 Z M445.899,130.105 C441.145,130.011 438.074,132.167 438.074,133.976 C438.074,143.6 486.794,143.137 486.794,133.303 C486.794,131.673 484.869,130.894 484.185,130.526 C488.161,139.929 444.384,139.193 444.384,133.639 C444.384,132.377 447.624,131.115 450.611,131.704 L448.087,130.274 C447.34,130.158 446.583,130.116 445.899,130.105 Z M491.926,136.585 C484.522,143.747 465.778,146.314 446.909,141.886 C465.778,149.774 491.832,145.388 491.926,136.585 Z" />+ </g>+ <g id="Black-S">+ <path d="M669.376,76 C673.152,84.909 655.839,90.368 654.229,97.794 C652.757,104.609 664.485,112.603 664.495,112.603 C662.707,109.784 661.403,107.407 659.615,103.011 C656.585,95.585 678.074,88.885 669.376,76 Z M680.819,88.369 C680.819,88.369 665.684,89.327 664.916,99.224 C664.569,103.631 668.913,105.945 669.039,109.153 C669.144,111.772 666.43,113.95 666.43,113.95 C666.43,113.95 671.3,113.066 672.826,109.069 C674.508,104.63 669.544,101.601 670.049,98.046 C670.533,94.649 680.819,88.369 680.819,88.369 Z M684.522,111.173 C682.933,111.099 681.145,111.688 679.557,112.856 C682.692,112.161 685.363,114.128 685.363,116.39 C685.363,121.459 678.127,126.235 678.127,126.235 C678.127,126.235 689.318,124.983 689.318,116.642 C689.318,113.203 687.162,111.299 684.522,111.173 Z M654.818,111.257 C650.916,111.394 643.122,112.035 643.122,115.043 C643.122,119.23 661.277,119.556 674.256,116.979 C674.256,116.979 677.79,114.517 678.716,113.613 C670.206,115.38 650.779,115.653 650.779,114.118 C650.779,112.708 657.006,111.257 657.006,111.257 C657.006,111.257 656.123,111.215 654.818,111.257 Z M653.64,118.998 C651.505,118.998 648.339,120.66 648.339,122.28 C648.339,125.541 664.411,128.044 676.275,123.29 L672.152,120.765 C664.106,123.395 649.244,122.522 653.64,118.998 Z M655.66,126.319 C652.746,126.319 650.864,128.16 650.864,129.516 C650.864,133.692 668.271,134.102 675.182,129.853 L670.806,126.992 C665.652,129.211 652.683,129.537 655.66,126.319 Z M645.899,130.105 C641.145,130.011 638.073,132.167 638.073,133.976 C638.073,143.6 686.794,143.137 686.794,133.303 C686.794,131.673 684.869,130.894 684.185,130.526 C688.161,139.929 644.384,139.193 644.384,133.639 C644.384,132.377 647.624,131.115 650.611,131.704 L648.087,130.274 C647.34,130.158 646.583,130.116 645.899,130.105 Z M691.926,136.585 C684.522,143.747 665.778,146.314 646.909,141.886 C665.778,149.774 691.832,145.388 691.926,136.585 Z" />+ </g>+ </g>+</svg>\ No newline at end of filediff --git a/ManicEmu/ManicEmu/Resources/Info.plist b/ManicEmu/ManicEmu/Resources/Info.plistindex f6470dce..7e23016a 100644--- a/ManicEmu/ManicEmu/Resources/Info.plist+++ b/ManicEmu/ManicEmu/Resources/Info.plist@@ -338,6 +338,18 @@<string>public.aoshuang.game.lynx</string></array></dict>+ <dict>+ <key>CFBundleTypeName</key>+ <string>J2ME Game</string>+ <key>CFBundleTypeRole</key>+ <string>Editor</string>+ <key>LSHandlerRank</key>+ <string>Owner</string>+ <key>LSItemContentTypes</key>+ <array>+ <string>public.aoshuang.game.j2me</string>+ </array>+ </dict><dict><key>CFBundleTypeName</key><string>Manic EMU Controller Skin</string>@@ -478,6 +490,7 @@<array><string>sidestore</string><string>atariemulator</string>+ <string>xenios</string></array><key>LSRequiresIPhoneOS</key><true/>@@ -1217,6 +1230,27 @@</array></dict></dict>+ <dict>+ <key>UTTypeConformsTo</key>+ <array>+ <string>public.data</string>+ </array>+ <key>UTTypeDescription</key>+ <string>J2ME Game</string>+ <key>UTTypeIconFiles</key>+ <array>+ <string>file_icon.png</string>+ </array>+ <key>UTTypeIdentifier</key>+ <string>public.aoshuang.game.j2me</string>+ <key>UTTypeTagSpecification</key>+ <dict>+ <key>public.filename-extension</key>+ <array>+ <string>jar</string>+ </array>+ </dict>+ </dict><dict><key>UTTypeConformsTo</key><array>diff --git a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.stringsindex 7a8765ec..fd1e463d 100644--- a/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings+++ b/ManicEmu/ManicEmu/Resources/en.lproj/Localizable.strings@@ -887,3 +887,22 @@ Press the controller button to complete mapping...";"SafeMode" = "Safe Mode";"SafeModeDesc" = "Launching a game in Safe Mode disables all additional settings (such as custom resolution, fast forward, and shaders) and runs with a minimal configuration. This can help resolve issues caused by incorrect settings that prevent the game from starting. Applies to this launch only.";++"NotInstall" = "%@ is not installed.";+"FetchGamesFromXeniOS" = "Import Games from XeniOS";+"ScreenScaling" = "Screen Scaling";+"ScreenScalingStretch" = "Stretch";+"ScreenScalingFit" = "Fit";+"HeadsUp" = "Heads Up";+"Freej2meAlert" = "The freej2me core relies on the CheerpJ virtual machine. Due to CheerpJ licensing restrictions, it cannot be bundled with the app and must be loaded online each time the game starts. If no internet connection is available, it may fail to load. Downloading the CheerpJ runtime may take some time, so please be patient.";+"CheerpJLoadFailed" = "CheerpJ did not load successfully. You can continue waiting, or check your network connection and restart the game to try again.";+"RotateScreen" = "Rotate Screen";+"Width" = "Width";+"Height" = "Height";+"ScreenSize" = "Screen Size";+"J2MESettings" = "J2ME Settings";+"J2MESettingsTips" = "Due to differences in JAR standards, Manic EMU may not always detect the correct screen resolution or orientation. For the best display results, you can configure them manually.";+"J2MEScreenChange" = "J2ME screen settings have been saved. To apply the changes immediately, the game must be reset. Any unsaved progress may be lost. Reset now?";+"Later" = "Later";+"ResetImmediately" = "Reset Now";+"LoadingCheerpJ" = "Loading CheerpJ";diff --git a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.stringsindex 5a1f0db1..a143a758 100644--- a/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings+++ b/ManicEmu/ManicEmu/Resources/zh-Hans.lproj/Localizable.strings@@ -881,3 +881,22 @@"SafeMode" = "安全模式";"SafeModeDesc" = "以安全模式启动游戏将停用所有额外配置(如自定义分辨率、快进、着色器等),并以最小化配置运行。这有助于解决因配置错误导致游戏无法启动的问题。仅本次启动有效。";++"NotInstall" = "%@ 未安装";+"FetchGamesFromXeniOS" = "从 XeniOS 导入游戏";+"ScreenScaling" = "屏幕缩放";+"ScreenScalingStretch" = "拉伸";+"ScreenScalingFit" = "适配";+"HeadsUp" = "注意";+"Freej2meAlert" = "freej2me 核心依赖 CheerpJ 虚拟机。由于 CheerpJ 的商业授权限制,无法将其直接集成到应用中,因此每次启动游戏时都需要在线加载。如果设备没有网络连接,则可能无法正常加载。下载 CheerpJ 运行库可能需要一些时间,请耐心等待。";+"CheerpJLoadFailed" = "CheerpJ 似乎未能成功加载。您可以继续等待,或检查网络连接后重新启动游戏以再次尝试加载。";+"RotateScreen" = "旋转屏幕";+"Width" = "宽度";+"Height" = "高度";+"ScreenSize" = "屏幕尺寸";+"J2MESettings" = "J2ME 设置";+"J2MESettingsTips" = "由于 JAR 标准存在差异,Manic EMU 有时无法自动获取正确的分辨率或屏幕方向。为了获得更好的显示效果,您可以手动进行配置。";+"J2MEScreenChange" = "J2ME 屏幕设置已保存。若要立即生效,需要重置游戏,未保存的游戏进度可能会丢失。是否立即重置?";+"Later" = "稍后";+"ResetImmediately" = "立即重置";+"LoadingCheerpJ" = "正在加载 CheerpJ";diff --git a/ManicEmu/ManicEmu/Sources/Base/ApplicationSceneDelegate.swift b/ManicEmu/ManicEmu/Sources/Base/ApplicationSceneDelegate.swiftindex c74b39a5..ebd97d23 100644--- a/ManicEmu/ManicEmu/Sources/Base/ApplicationSceneDelegate.swift+++ b/ManicEmu/ManicEmu/Sources/Base/ApplicationSceneDelegate.swift@@ -75,7 +75,9 @@ class ApplicationSceneDelegate: UIResponder, UIWindowSceneDelegate {OAuthSwift.handle(url: url)} else if scheme == Constants.Strings.ManicScheme {if let host = url.host, host == Constants.Strings.MeloNXScheme {- MeloNXKit.processGames(callbackUrl: url)+ EmulatorInteractionKit.processGames(type: .meloNX, callbackUrl: url)+ } else if let host = url.host, host == Constants.Strings.XeniOSScheme {+ EmulatorInteractionKit.processGames(type: .xeniOS,callbackUrl: url)} else {Self.launchGameID = url.lastPathComponent}diff --git a/ManicEmu/ManicEmu/Sources/Base/Constants.swift b/ManicEmu/ManicEmu/Sources/Base/Constants.swiftindex e33cbd70..ae9cb472 100644--- a/ManicEmu/ManicEmu/Sources/Base/Constants.swift+++ b/ManicEmu/ManicEmu/Sources/Base/Constants.swift@@ -101,6 +101,8 @@ struct Constants {case .a7800: return 0.709case .jaguar: return 0.724case .lynx: return 1.118+ case .xbox360: return 0.7062+ case .j2me: return 0.75default: return 1.0}case .style2:@@ -336,6 +338,8 @@ struct Constants {static let ShaderImportedInDocument = Document.appendingPathComponent("Shaders")static let JGenesis = Resource.appendingPathComponent("jgenesis")static let RomPatcher = Resource.appendingPathComponent("RomPatcher")+ static let J2meJS = Resource.appendingPathComponent("j2mejs")+ static let Freej2meWeb = Resource.appendingPathComponent("freej2me")}struct DefaultKey {@@ -356,6 +360,7 @@ struct Constants {static let Appearance = "Appearance"static let HasShowPlayCasePromo = "HasShowPlayCasePromo"static let HasImportedPlayCaseSkin = "HasImportedPlayCaseSkin"+ static let HasShowFreeJ2meAlert = "HasShowFreeJ2meAlert"}struct Font {@@ -434,6 +439,8 @@ struct Constants {static let AppendedShaders = "MANIC_EMU_PRESET_LIST"static let ShaderForceBase = "MANIC_EMU_FORCE_BASE"static let MeloNXScheme = "atariemulator"+ static let XeniOSScheme = "xenios"+ static let J2MEScreenSizes = ["96x65", "96x96", "104x80", "128x128", "132x176", "128x160", "176x208", "176x220", "208x208", "240x320", "320x240", "240x400", "352x416", "360x640", "640x360", "480x800", "800x480"]}enum Config {@@ -531,6 +538,8 @@ struct Constants {static let ManufacturerFilterChange = NSNotification.Name(rawValue: "ManufacturerFilterChange")//RetroArch的着色器下载成功static let RetroArchShadersDownloadSuccess = NSNotification.Name(rawValue: "RetroArchShadersDownloadSuccess")+ //重置游戏+ static let ResetImmediately = NSNotification.Name(rawValue: "ResetImmediately")}struct URLs {@@ -621,6 +630,8 @@ struct Constants {static let PlayCasePromo = URL(string: "https://playcase.gg/playmanic")!static let FetchMeloNXGames = URL(string: "\(Constants.Strings.MeloNXScheme)://gameInfo?scheme=manicemu")!static func MeloNXGameLaunch(gameId: String) -> URL { URL(string: "\(Constants.Strings.MeloNXScheme)://game?id=\(gameId)")! }+ static let FetchXeniOSGames = URL(string: "\(Constants.Strings.XeniOSScheme)://gameInfo?scheme=manicemu")!+ static func XeniOSGameLaunch(gameId: String) -> URL { URL(string: "\(Constants.Strings.XeniOSScheme)://launch?title-id=\(gameId)")! }}struct BIOS {diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swiftindex 32a7f378..a4641c44 100644--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/ExtraKey.swift@@ -49,4 +49,7 @@ enum ExtraKey: String {case rightDifficultycase ignoreShaderConfigcase pspConfig+ case screenScaling+ case j2meScreenSize+ case j2meScreenRotate}diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swiftindex 4bb3da98..00c3d224 100644--- a/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Models/Manufacturer.swift@@ -9,13 +9,13 @@import ManicEmuCoreenum Manufacturer: Int, CaseIterable {- case nintendo, sony, sega, arcade, atari+ case nintendo, sony, sega, arcade, atari, sun, microsoftstatic var allCases: [Manufacturer] {if Locale.prefersUS {- [.nintendo, .sony, .sega, .atari, .arcade]+ [.nintendo, .sony, .sega, .atari, .arcade, .sun, .microsoft]} else {- [.nintendo, .sony, .sega, .arcade, .atari]+ [.nintendo, .sony, .sega, .arcade, .atari, .sun, .microsoft]}}@@ -31,6 +31,10 @@ enum Manufacturer: Int, CaseIterable {"Arcade"case .atari:"Atari"+ case .sun:+ "Sun"+ case .microsoft:+ "Microsoft"}}@@ -50,6 +54,10 @@ enum Manufacturer: Int, CaseIterable {R.image.arcade_normal()!case .atari:R.image.atari_normal()!+ case .sun:+ R.image.sun_normal()!+ case .microsoft:+ R.image.microsoft_normal()!}}@@ -65,6 +73,10 @@ enum Manufacturer: Int, CaseIterable {R.image.arcade_highlight()!case .atari:R.image.atari_highlight()!+ case .sun:+ R.image.sun_highlight()!+ case .microsoft:+ R.image.microsoft_highlight()!}}}diff --git a/ManicEmu/ManicEmu/Sources/Business/Common/Views/J2MEView.swift b/ManicEmu/ManicEmu/Sources/Business/Common/Views/J2MEView.swiftindex 8b4f2231..00941fb9 100644--- a/ManicEmu/ManicEmu/Sources/Business/Common/Views/J2MEView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Common/Views/J2MEView.swift@@ -6,18 +6,19 @@// Copyright © 2026 Manic EMU. All rights reserved.//import WebKit+import ManicEmuCore+import ZIPFoundation-/// Genesis/Sega CD/32X 6键手柄按钮映射-/// 这些值对应 KeyboardEvent.code 字符串,用于与 JGenesis 核心通信+/// J2ME button mapping for emulator inputenum J2MEButton: String, CaseIterable {- // 方向键+ // Direction keyscase upcase downcase leftcase rightcase fire-- // 数字键++ // Number keyscase num0case num1case num2@@ -30,36 +31,346 @@ enum J2MEButton: String, CaseIterable {case num9case starcase pound-- // 功能键++ // Function keyscase softkeyLeftcase softkeyRight++ /// Returns the key code used by the JavaScript layer+ var keyCode: String {+ switch self {+ case .up: return "ArrowUp"+ case .down: return "ArrowDown"+ case .left: return "ArrowLeft"+ case .right: return "ArrowRight"+ case .fire: return "Enter"+ case .num0: return "Digit0"+ case .num1: return "Digit1"+ case .num2: return "Digit2"+ case .num3: return "Digit3"+ case .num4: return "Digit4"+ case .num5: return "Digit5"+ case .num6: return "Digit6"+ case .num7: return "Digit7"+ case .num8: return "Digit8"+ case .num9: return "Digit9"+ case .star: return "KeyE"+ case .pound: return "KeyR"+ case .softkeyLeft: return "F1"+ case .softkeyRight: return "F2"+ }+ }}-class J2MEView: BaseView {+/// J2ME core type enumeration+enum J2MECoreType: String {+ case j2meJS = "J2meJS"+ case freej2meWeb = "Freej2meWeb"+}++struct J2MESize {+ var width: Int+ var height: Int+ var stringValue: String { "\(width)x\(height)" }+ var cgSize: CGSize { CGSize(width: width, height: height) }++ init(width: Int, height: Int) {+ self.width = width+ self.height = height+ }- /// ROM路径+ init?(stringValue: String) {+ let components = stringValue.components(separatedBy: "x")+ if components.count == 2, let w = components[0].trimmed.int, let h = components[1].trimmed.int {+ self.init(width: w, height: h)+ } else {+ return nil+ }+ }++ static var defaultSize: J2MESize {+ return J2MESize(width: 240, height: 320)+ }+}++/// Parsed J2ME JAR manifest+struct J2MEManifest {+ let raw: [String: String]+ var imageData: Data? = nil+ var midletName: String? { raw["MIDlet-Name"] }+ var midletVersion: String? { raw["MIDlet-Version"] }+ var midletVendor: String? { raw["MIDlet-Vendor"] }+ var midletDescription: String? { raw["MIDlet-Description"] }+ var midletInfoURL: String? { raw["MIDlet-Info-URL"] }+ var midletIcon: String? { raw["MIDlet-Icon"] }+ var microEditionProfile: String? { raw["MicroEdition-Profile"] }+ var microEditionConfiguration: String? { raw["MicroEdition-Configuration"] }+ var fileName: String? { raw["File-Name"] }+ var phoneType: String? { raw["Phone-Type"] }++ /// Main MIDlet class name (parsed from MIDlet-1)+ var mainClassName: String? {+ guard let midlet1 = raw["MIDlet-1"] else { return nil }+ let parts = midlet1.components(separatedBy: ",")+ return parts.last?.trimmingCharacters(in: .whitespaces)+ }++ /// Display name from MIDlet-1 (first field)+ var displayName: String? {+ guard let midlet1 = raw["MIDlet-1"] else { return midletName }+ let parts = midlet1.components(separatedBy: ",")+ let name = parts.first?.trimmingCharacters(in: .whitespaces)+ return (name?.isEmpty == false) ? name : midletName+ }++ /// Icon path from MIDlet-1 (second field)+ var iconPath: String? {+ guard let midlet1 = raw["MIDlet-1"] else { return midletIcon }+ let parts = midlet1.components(separatedBy: ",")+ guard parts.count >= 2 else { return midletIcon }+ let icon = parts[1].trimmingCharacters(in: .whitespaces)+ return icon.isEmpty ? midletIcon : icon+ }++ var screenSize: J2MESize {+ let sizeStr = raw["Nokia-MIDlet-Canvas-Size"]+ ?? raw["MIDlet-ScreenSize"]+ ?? raw["Nokia-MIDlet-Original-Display-Size"]+ ?? raw["MIDlet-Display-Size"]+ if let str = sizeStr {+ let parts = str.components(separatedBy: CharacterSet(charactersIn: "x,*"))+ if parts.count == 2,+ let w = Int(parts[0].trimmingCharacters(in: .whitespaces)),+ let h = Int(parts[1].trimmingCharacters(in: .whitespaces)),+ w > 0, h > 0 {+ return J2MESize(width: w, height: h)+ }+ }++ if let fileName {+ let pattern = try? NSRegularExpression(pattern: #"(\d{3})x(\d{3})"#, options: .caseInsensitive)+ if let match = pattern?.firstMatch(in: fileName, range: NSRange(fileName.startIndex..., in: fileName)), match.numberOfRanges == 3 {+ let wRange = Range(match.range(at: 1), in: fileName)!+ let hRange = Range(match.range(at: 2), in: fileName)!+ if let w = Int(fileName[wRange]), let h = Int(fileName[hRange]), w > 0, h > 0 {+ return J2MESize(width: w, height: h)+ }+ }+ }++ return J2MESize.defaultSize+ }++ private static func containsBytes(_ pattern: [UInt8], in target: [UInt8]) -> Bool {+ guard !pattern.isEmpty, target.count >= pattern.count else { return false }+ let limit = target.count - pattern.count+ for i in 0...limit {+ if target[i..<(i + pattern.count)].elementsEqual(pattern) { return true }+ }+ return false+ }++ /// Read manifest from a JAR file at the given path (no WebView needed)+ static func read(from jarPath: String) -> J2MEManifest? {+ guard let archive = Archive(url: URL(fileURLWithPath: jarPath), accessMode: .read) else {+ return nil+ }+ guard let entry = archive["META-INF/MANIFEST.MF"] else {+ return nil+ }+ var data = Data()+ do {+ _ = try archive.extract(entry) { chunk in+ data.append(chunk)+ }+ } catch {+ return nil+ }+ guard let content = String(data: data, encoding: .utf8) else {+ return nil+ }++ //获取MANIFEST.MF+ var dict = [String: String]()+ var currentKey: String?+ var currentValue: String = ""++ for line in content.components(separatedBy: .newlines) {+ if line.hasPrefix(" ") || line.hasPrefix("\t") {+ // Continuation line+ currentValue += line.dropFirst()+ } else {+ if let key = currentKey {+ dict[key] = currentValue+ }+ if let colonIndex = line.firstIndex(of: ":") {+ currentKey = String(line[line.startIndex..<colonIndex]).trimmingCharacters(in: .whitespaces)+ currentValue = String(line[line.index(after: colonIndex)...]).trimmingCharacters(in: .whitespaces)+ } else {+ currentKey = nil+ currentValue = ""+ }+ }+ }+ if let key = currentKey {+ dict[key] = currentValue+ }++ //FileName+ dict["File-Name"] = jarPath.lastPathComponent++ //PhoneType+ let siemensSig = Array("com/siemens/mp/".utf8)+ let mc3Sig = Array("com/mascotcapsule/micro3d/v3/".utf8)+ let nokiaCatStr = "Nokia-MIDlet-Category: Game"+ var phoneType: String? = nil+ for entry in archive {+ guard phoneType == nil else { break }+ let name = entry.path++ var data = Data()+ guard (try? archive.extract(entry) { data.append($0) }) != nil else { continue }+ let bytes = Array(data)++ if name == "META-INF/MANIFEST.MF" {+ if let text = String(data: data, encoding: .utf8), text.contains(nokiaCatStr) {+ phoneType = "Nokia"+ }+ continue+ }++ guard name.hasSuffix(".class") else { continue }++ if !name.hasPrefix("com/siemens/") && containsBytes(siemensSig, in: bytes) {+ phoneType = "Siemens"+ } else if containsBytes(mc3Sig, in: bytes) {+ phoneType = "SonyEricsson"+ }+ }+ if let phoneType {+ dict["Phone-Type"] = phoneType+ }++ var manifest = J2MEManifest(raw: dict)+ if let iconPath = manifest.iconPath {+ let cleanPath = iconPath.hasPrefix("/") ? String(iconPath.dropFirst()) : iconPath+ guard let entry = archive[cleanPath] else { return nil }+ var data = Data()+ do {+ _ = try archive.extract(entry) { chunk in+ data.append(chunk)+ }+ manifest.imageData = data+ } catch {+ Log.debug("解析j2me图片失败")+ }+ }+ return manifest+ }+}++/// J2ME Emulator View - WebView based implementation+class J2MEView: BaseView {++ /// ROM pathvar romPath: String? = nil- private let serverType: LocalWebServer.ServerType+ var savePath: String? = nil+ var screenSize = J2MESize.defaultSize+ var rotation = false++ /// Core type (J2meJS or Freej2meWeb)+ private let coreType: J2MECoreType++ /// Local server for serving web assets+ private let localServer: LocalWebServer++ /// Export save state complete callback+ private var onExportSaveStateComplete: ((_ data: Data?, _ success: Bool) -> Void)?++ /// Import save state complete callback+ private var onImportSaveStateComplete: ((_ success: Bool, _ error: String?) -> Void)?++ /// Initialization complete callback+ var didFinishedInit: (() -> Void)? = nil++ /// MIDlet exit callback (game requested to quit)+ var onExit: (() -> Void)? = nil++ /// Save data written callback (for auto-save)+ private var onSaveDataWritten: ((_ data: Data) -> Void)?++ /// Pending save request (path + completion) for getSaveDataResult message+ private var pendingSavePath: String?+ private var pendingSaveCompletion: ((Bool) -> Void)?+ private var pendingSaveWorkItem: DispatchWorkItem?+ /// load jar callback+ var openJarCompletion: ((Bool)->Void)? = nil++ private var pressingButtons: [J2MEButton] = []+ private var lastKnownBounds: CGRect = .zero++ // MARK: - Initialization++ init(coreType: J2MECoreType) {+ self.coreType = coreType++ // Determine server type+ let serverType: LocalWebServer.ServerType+ switch coreType {+ case .j2meJS:+ serverType = .J2meJS+ case .freej2meWeb:+ serverType = .freej2meWeb+ }++ self.localServer = LocalWebServer()+ super.init(frame: .zero)++ // Start local server+ try? localServer.start(serverType: serverType)++ setupWebView()+ }++ required init?(coder: NSCoder) {+ fatalError("init(coder:) has not been implemented")+ }++ deinit {+ Log.debug("\(String(describing: Self.self)) deinit")+ localServer.stop()+ }++ // MARK: - WebView Setup+private lazy var webView: WKWebView = {let configuration = WKWebViewConfiguration()configuration.allowsInlineMediaPlayback = trueconfiguration.mediaTypesRequiringUserActionForPlayback = []-- // 添加消息处理器++ // Use non-persistent data store for local files, persistent for CheerpJ caching+ let dataStore = WKWebsiteDataStore.default()+ configuration.websiteDataStore = dataStore++ // Add message handlerslet contentController = WKUserContentController()let proxy = WeakScriptMessageHandler(target: self)contentController.add(proxy, name: "console")+ contentController.add(proxy, name: "j2me")configuration.userContentController = contentController-+let view = WKWebView(frame: .zero, configuration: configuration)view.autoresizingMask = [.flexibleWidth, .flexibleHeight]view.navigationDelegate = selfview.uiDelegate = selfview.allowsBackForwardNavigationGestures = falseview.scrollView.isScrollEnabled = false-+ view.scrollView.bounces = false+ view.isOpaque = false+ view.backgroundColor = .black++ // Console hooklet consoleHookJS = """(function () {function wrap(type) {@@ -74,6 +385,38 @@ class J2MEView: BaseView {}['log', 'warn', 'error', 'info', 'debug'].forEach(wrap);++ // Intercept fetch to log all network requests (JS, WASM, assets, etc.)+ const _originalFetch = window.fetch;+ window.fetch = function(input, init) {+ const url = typeof input === 'string' ? input : (input && input.url ? input.url : String(input));+ const method = (init && init.method) ? init.method.toUpperCase() : 'GET';+ console.log('[fetch] ' + method + ' ' + url);+ return _originalFetch.apply(this, arguments).then(function(response) {+ console.log('[fetch] ' + response.status + ' ' + url);+ return response;+ }).catch(function(err) {+ console.log('[fetch] ERR ' + url + ' ' + err);+ throw err;+ });+ };++ // Intercept XHR+ const _XHROpen = XMLHttpRequest.prototype.open;+ const _XHRSend = XMLHttpRequest.prototype.send;+ XMLHttpRequest.prototype.open = function(method, url) {+ this._logUrl = url;+ this._logMethod = method;+ console.log('[xhr] ' + method.toUpperCase() + ' ' + url);+ return _XHROpen.apply(this, arguments);+ };+ XMLHttpRequest.prototype.send = function() {+ const self = this;+ this.addEventListener('loadend', function() {+ console.log('[xhr] ' + self.status + ' ' + self._logUrl);+ });+ return _XHRSend.apply(this, arguments);+ };})();"""let script = WKUserScript(@@ -82,119 +425,569 @@ class J2MEView: BaseView {forMainFrameOnly: false)view.configuration.userContentController.addUserScript(script)-+return view}()-- private lazy var localServer: LocalWebServer = {- let server = LocalWebServer()- try? server.start(serverType: serverType)- return server- }()-- deinit {- Log.debug("\(String(describing: Self.self)) deinit")- localServer.stop()++ override func layoutSubviews() {+ super.layoutSubviews()+ guard bounds != lastKnownBounds else { return }+ lastKnownBounds = bounds+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.safeApply) window.j2meAPI.safeApply();"+ case .freej2meWeb:+ script = "if (window.freej2meAPI && window.freej2meAPI.safeApply) window.freej2meAPI.safeApply();"+ }+ webView.evaluateJavaScript(script)}-- init(serverType: LocalWebServer.ServerType) {- self.serverType = serverType- super.init(frame: .zero)+ private func setupWebView() {addSubview(webView)webView.snp.makeConstraints { make inmake.edges.equalToSuperview()}+if let url = localServer.getURL() {- webView.load(URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData))+ webView.load(URLRequest(url: url, cachePolicy: coreType == .freej2meWeb ? .useProtocolCachePolicy : .reloadIgnoringCacheData))}}-- required init?(coder: NSCoder) {- fatalError("init(coder:) has not been implemented")- }-}-// MARK: - 公开接口-extension J2MEView {-- /// 运行Jar- func openJar(filePath: String) {-+ // MARK: - Public API++ /// Open a JAR file for emulation+ func openJar(filePath: String, savePath: String?, screenSize: J2MESize, rotation: Bool, completion: ((Bool)->Void)? = nil) {+ openJarCompletion = completion++ // Setup WebView if not already done+ if webView.superview == nil {+ setupWebView()+ }++ romPath = filePath+ self.savePath = savePath+ self.screenSize = screenSize+ self.rotation = rotation++ // Register file to local server+ let fileId = localServer.registerFile(filePath: filePath)+ let jarURL = "http://localhost:8080/file/\(fileId)"+ let fileName = filePath.lastPathComponent++ // Build the JavaScript to load the JAR+ let script: String+ switch coreType {+ case .j2meJS:+ // j2meJS: load save separately before openJar (different engine, no CheerpJ conflict)+ if let savePath, FileManager.default.fileExists(atPath: savePath) {+ loadSave(path: savePath)+ }+ script = buildJ2meJSLoadScript(jarURL: jarURL, fileName: fileName, screenSize: screenSize, rotation: rotation)+ case .freej2meWeb:+ // freej2meWeb: pass save data into openJar so it's restored BEFORE FreeJ2ME.main()+ // is called — CheerpJ rejects importData() while Java code is already running.+ var saveBase64: String? = nil+ if let savePath, FileManager.default.fileExists(atPath: savePath),+ let data = try? Data(contentsOf: URL(fileURLWithPath: savePath)) {+ saveBase64 = data.base64EncodedString()+ }+ script = buildFreej2meLoadScript(jarURL: jarURL, fileName: fileName, saveBase64: saveBase64, screenSize: screenSize, rotation: rotation)+ }++ webView.evaluateJavaScript(script) { [weak self] _, error in+ if let error = error {+ Log.debug("❌ Execute JavaScript failed: \(error)")+ } else {+ Log.debug("✅ JavaScript injection successful")+ }+ _ = self // Capture self+ }}-- /// 重置模拟器- func reset() {-++ /// Reset the emulator (reload WebView and re-open the current JAR)+ func reset(screenSize: J2MESize, rotation: Bool, completion: ((Bool)->Void)? = nil) {+ guard let currentRomPath = romPath else {+ Log.debug("❌ No ROM loaded, nothing to reset")+ return+ }+ self.screenSize = screenSize+ self.rotation = rotation++ let previousInitCallback = didFinishedInit+ didFinishedInit = { [weak self] in+ guard let self = self else { return }+ self.didFinishedInit = previousInitCallback+ self.openJar(filePath: currentRomPath, savePath: savePath, screenSize: screenSize, rotation: rotation, completion: completion)+ }++ if let url = localServer.getURL() {+ webView.load(URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData))+ }}-- /// 保存 SRAM 存档到文件- /// - Parameters:- /// - path: 保存路径- /// - completion: 完成回调- func save(to path: String, completion: ((_ isSucess: Bool)->Void)? = nil) {-++ // MARK: - Save/Load++ /// Save SRAM to file (uses message handler so result is delivered after _getSaveData Promise resolves)+ func save(to path: String, completion: ((_ isSucess: Bool) -> Void)? = nil) {+ let apiObj: String+ switch coreType {+ case .j2meJS: apiObj = "j2meAPI"+ case .freej2meWeb: apiObj = "freej2meAPI"+ }++ pendingSaveWorkItem?.cancel()+ pendingSavePath = path+ pendingSaveCompletion = completion++ let timeout = DispatchWorkItem { [weak self] in+ guard let self = self else { return }+ if self.pendingSavePath != nil {+ Log.debug("❌ Get save data timeout")+ self.pendingSaveWorkItem = nil+ self.pendingSavePath = nil+ self.pendingSaveCompletion?(false)+ self.pendingSaveCompletion = nil+ }+ }+ pendingSaveWorkItem = timeout+ DispatchQueue.main.asyncAfter(deadline: .now() + 15, execute: timeout)++ let script = """+ (function(){+ var api = window.\(apiObj);+ if (!api || typeof api.getSaveData !== 'function') {+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'getSaveDataResult', base64: null }); } catch(e) {}+ return;+ }+ api.getSaveData().then(function(b64) {+ console.log("!!!!!!success!!!!");+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'getSaveDataResult', base64: b64 }); } catch(e) {}+ }).catch(function() {+ console.log("!!!!!!failed!!!!");+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'getSaveDataResult', base64: null }); } catch(e) {}+ });+ })();+ """++ webView.evaluateJavaScript(script) { [weak self] _, error in+ if let error = error {+ Log.debug("❌ Get save data script failed: \(error)")+ self?.pendingSaveWorkItem?.cancel()+ self?.pendingSavePath = nil+ self?.pendingSaveCompletion?(false)+ self?.pendingSaveCompletion = nil+ }+ }}-- /// 从文件加载 SRAM 存档- /// - Parameter path: 存档文件路径++ /// Load SRAM from filefunc loadSave(path: String) {-+ guard FileManager.default.fileExists(atPath: path) else {+ Log.debug("❌ Save file not found: \(path)")+ return+ }++ do {+ let data = try Data(contentsOf: URL(fileURLWithPath: path))+ let base64 = data.base64EncodedString()++ let apiObj: String+ switch coreType {+ case .j2meJS: apiObj = "j2meAPI"+ case .freej2meWeb: apiObj = "freej2meAPI"+ }+ let script = "if (window.\(apiObj)) window.\(apiObj).loadSaveData('\(base64)');"++ webView.evaluateJavaScript(script) { _, error in+ if let error = error {+ Log.debug("❌ Load save failed: \(error)")+ } else {+ Log.debug("✅ Save loaded: \(path)")+ }+ }+ } catch {+ Log.debug("❌ Read save file failed: \(error)")+ }}-- /// 设置纵横比- func setAspect(width: Int, height: Int) {+ // MARK: - Save State (Instant Save)++ /// Save instant save state to file+ func saveState(completion: ((_ data: Data?) -> Void)? = nil) {+ let previousCallback = onExportSaveStateComplete++ onExportSaveStateComplete = { [weak self] data, success in+ self?.onExportSaveStateComplete = previousCallback++ guard success, let data = data else {+ Log.debug("❌ Export save state failed")+ completion?(nil)+ return+ }++ Log.debug("✅ Save state generated")+ completion?(data)+ }++ let apiObj: String+ switch coreType {+ case .j2meJS: apiObj = "j2meAPI"+ case .freej2meWeb: apiObj = "freej2meAPI"+ }+ let script = "if (window.\(apiObj) && window.\(apiObj).exportSaveState) window.\(apiObj).exportSaveState();"++ webView.evaluateJavaScript(script) { [weak self] _, error in+ if let error = error {+ Log.debug("❌ Export save state call failed: \(error)")+ self?.onExportSaveStateComplete = previousCallback+ completion?(nil)+ }+ }}-- // MARK: 输入控制++ /// Load instant save state from file+ func loadSaveState(path: String, completion: ((_ isSuccess: Bool) -> Void)? = nil) {+ guard FileManager.default.fileExists(atPath: path) else {+ Log.debug("❌ Save state file not found: \(path)")+ completion?(false)+ return+ }++ do {+ let data = try Data(contentsOf: URL(fileURLWithPath: path))+ let base64String = data.base64EncodedString()++ let previousCallback = onImportSaveStateComplete+ onImportSaveStateComplete = { [weak self] success, error in+ guard let self else { return }+ self.onImportSaveStateComplete = previousCallback++ if success {+ Log.debug("✅ Save state imported, resetting game...")+ // For j2meJS: RecordStore is now in IndexedDB; reset so the game+ // restarts and loads its state from the restored RecordStore.+ if self.coreType == .j2meJS {+ self.reset(screenSize: self.screenSize, rotation: self.rotation)+ }+ } else {+ Log.debug("❌ Load save state failed: \(error ?? "unknown error")")+ }+ completion?(success)+ }++ let apiObj: String+ switch coreType {+ case .j2meJS: apiObj = "j2meAPI"+ case .freej2meWeb: apiObj = "freej2meAPI"+ }+ let script = "if (window.\(apiObj) && window.\(apiObj).importSaveState) window.\(apiObj).importSaveState('\(base64String)');"++ webView.evaluateJavaScript(script) { [weak self] _, error in+ if let error = error {+ Log.debug("❌ Import save state failed: \(error)")+ self?.onImportSaveStateComplete = previousCallback+ completion?(false)+ }+ }+ } catch {+ Log.debug("❌ Read save state file failed: \(error)")+ completion?(false)+ }+ }++ // MARK: - Screen Settings++ /// Set screen size+ func setAspect(width: Int, height: Int) {+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.setScreenSize) window.j2meAPI.setScreenSize(\(width), \(height));"+ case .freej2meWeb:+ script = "if (window.freej2meAPI && window.freej2meAPI.setScreenSize) window.freej2meAPI.setScreenSize(\(width), \(height));"+ }+ webView.evaluateJavaScript(script)+ }++ // MARK: - Input Control++ /// Press a button/// - Parameters:- /// - button: 按钮- /// - pressed: true 表示按下,false 表示释放+ /// - button: The button to pressfunc pressButton(_ button: J2MEButton, pressed: Bool) {-+ if coreType == .j2meJS {+ //需要处理以下防抖+ if pressed {+ if pressingButtons.contains([button]) {+ return+ }+ pressingButtons.append(button)+ } else {+ pressingButtons.removeAll(where: { $0 == button })+ }+ }+ let action = pressed ? "keyDown" : "keyUp"+ let script = "if (window.Input) window.Input.\(action)('\(button.keyCode)');"+ webView.evaluateJavaScript(script)}-- /// 设置是否静音++ // MARK: - Audio++ /// Set mute statefunc setMute(_ mute: Bool) {-+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI) window.j2meAPI.setMute(\(mute));"+ case .freej2meWeb:+ script = "if (window.freej2meAPI) window.freej2meAPI.setMute(\(mute));"+ }+ webView.evaluateJavaScript(script)}-- /// 获取截图- /// - Note: 通过 WebView 截图获取当前画面++ // MARK: - Screenshot++ /// Get screenshotfunc snapShot() -> UIImage? {- // 使用 WebView 的截图能力let renderer = UIGraphicsImageRenderer(bounds: webView.bounds)let image = renderer.image { _ inwebView.drawHierarchy(in: webView.bounds, afterScreenUpdates: true)}return image}-- /// 快进 - 设置模拟器运行速度- /// - Parameter speed: 速度倍率 (1.0 = 正常速度, 2.0 = 2倍速, 等等)++ // MARK: - Fast Forward++ /// Set emulation speed (1.0 = normal, 2.0 = 2x, etc.)func fastForward(speed: Float) {-+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.setSpeed) window.j2meAPI.setSpeed(\(speed));"+ case .freej2meWeb:+ script = "if (window.freej2meAPI) window.freej2meAPI.setSpeed(\(speed));"+ }+ webView.evaluateJavaScript(script)}-- /// 暂停模拟器- func pause() {+ // MARK: - Pause/Resume++ /// Pause the emulator+ func pause() {+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.pause) window.j2meAPI.pause();"+ case .freej2meWeb:+ script = "if (window.freej2meAPI && window.freej2meAPI.pause) window.freej2meAPI.pause();"+ }+ webView.evaluateJavaScript(script)}-- /// 恢复模拟器++ /// Resume the emulatorfunc resume() {+ let script: String+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.resume) window.j2meAPI.resume();"+ case .freej2meWeb:+ script = "if (window.freej2meAPI && window.freej2meAPI.resume) window.freej2meAPI.resume();"+ }+ webView.evaluateJavaScript(script)+ }+ /// Set scale mode ('stretch' or 'fit')+ func setScaleMode(_ scale: GameSetting.ScreenScaling) {+ let script: String+ let mode = scale == .stretch ? "stretch" : "fit"+ switch coreType {+ case .j2meJS:+ script = "if (window.j2meAPI && window.j2meAPI.setScaleMode) window.j2meAPI.setScaleMode('\(mode)');"+ case .freej2meWeb:+ script = "if (window.freej2meAPI && window.freej2meAPI.setScaleMode) window.freej2meAPI.setScaleMode('\(mode)');"+ }+ webView.evaluateJavaScript(script)+ }++ // MARK: - Private Helpers++ private func buildJ2meJSLoadScript(jarURL: String, fileName: String, screenSize: J2MESize, rotation: Bool) -> String {+ // Pass screen size as third arg to _openJar so canvas is sized before startApp() runs.+ // JS accepts "WxH" string or null.+ let sizeArg = "'\(screenSize.width)x\(screenSize.height)'"+ let rotationArg = rotation ? "true" : "false"+ return """+ (async () => {+ try {+ console.log('🔄 Loading JAR: \(fileName)');++ const response = await fetch('\(jarURL)');+ if (!response.ok) {+ console.log('Download error:' + response.status);+ throw new Error('HTTP ' + response.status);+ }+ const buffer = await response.arrayBuffer();+ const bytes = new Uint8Array(buffer);++ console.log('📦 JAR size:', bytes.length, 'bytes');++ if (window.j2me && window.j2me.openJar) {+ window.j2me.openJar(bytes, '\(fileName)', \(sizeArg), \(rotationArg));+ console.log('✅ JAR loaded successfully');+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: true }); } catch(e) {}+ } else {+ console.error('❌ J2ME not ready');+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: false }); } catch(e) {}+ }+ } catch (error) {+ console.error('❌ JAR loading failed:', error);+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: false }); } catch(e) {}+ }+ })();+ null;+ """+ }++ private func buildFreej2meLoadScript(jarURL: String, fileName: String, saveBase64: String? = nil, screenSize: J2MESize, rotation: Bool) -> String {+ // Pass saveBase64 as a JS string literal (null if none). The openJar function+ // will call LauncherUtil.importData() BEFORE starting FreeJ2ME.main() so that+ // CheerpJ has no running Java code when the import happens.+ let saveArg = saveBase64.map { "'\($0)'" } ?? "null"++ // Pass device locale so freej2me sets microedition.locale to match the system+ // language (same behavior as J2meJS which reads navigator.language).+ // Converts iOS locale format (e.g. "zh-Hans-CN") to BCP-47 short form ("zh-CN").+ let locale = Locale.current.identifier.replacingOccurrences(of: "_", with: "-")+ // Simplify script-subtag locales: "zh-Hans-CN" → "zh-CN"+ let localeParts = locale.components(separatedBy: "-")+ let shortLocale: String+ if localeParts.count >= 3 {+ shortLocale = "\(localeParts[0])-\(localeParts[localeParts.count - 1])"+ } else {+ shortLocale = locale+ }++ let sizeArg = "'\(screenSize.width)x\(screenSize.height)'"+ let rotationArg = rotation ? "true" : "false"++ return """+ (async () => {+ try {+ console.log('🔄 Loading JAR: \(fileName)');++ const response = await fetch('\(jarURL)');+ if (!response.ok) {+ console.log('Download error:' + response.status);+ throw new Error('HTTP ' + response.status);+ }+ const buffer = await response.arrayBuffer();+ const bytes = new Uint8Array(buffer);++ console.log('📦 JAR size:', bytes.length, 'bytes');++ if (window.freej2meAPI && window.freej2meAPI.openJar) {+ await window.freej2meAPI.openJar(bytes, '\(fileName)', \(saveArg), '\(shortLocale)', \(sizeArg), \(rotationArg));+ console.log('✅ freej2me JAR loaded successfully');+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: true }); } catch(e) {}+ } else {+ console.error('❌ freej2me not ready');+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: false }); } catch(e) {}+ }+ } catch (error) {+ console.error('❌ JAR loading failed:', error);+ try { window.webkit.messageHandlers.j2me.postMessage({ type: 'openJarCompletion', success: false }); } catch(e) {}+ }+ })();+ null;+ """}-}// MARK: - WKScriptMessageHandlerextension J2MEView: WKScriptMessageHandler {-+func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {if message.name == "console" {- Log.debug("JS: \(message.body)")+ if let body = message.body as? [String: String],+ let type = body["type"],+ let msg = body["message"] {+ Log.debug("JS [\(type)]: \(msg)")+ }+ return+ }++ guard message.name == "j2me",+ let body = message.body as? [String: Any],+ let type = body["type"] as? String else {+ return+ }++ switch type {+ case "openJarCompletion":+ if let success = body["success"] as? Bool {+ DispatchQueue.main.asyncAfter(delay: 3.75) { [weak self] in+ self?.openJarCompletion?(success)+ }+ }++ case "getSaveDataResult":+ //手动调用save方法获取游戏存档+ pendingSaveWorkItem?.cancel()+ pendingSaveWorkItem = nil+ let path = pendingSavePath+ let comp = pendingSaveCompletion+ pendingSavePath = nil+ pendingSaveCompletion = nil+ guard let path = path else { break }+ let base64String = body["base64"] as? String+ if let b64 = base64String, !b64.isEmpty, let data = Data(base64Encoded: b64) {+ do {+ try data.write(to: URL(fileURLWithPath: path))+ Log.debug("✅ Save data written to: \(path)")+ comp?(true)+ } catch {+ Log.debug("❌ Write save data failed: \(error)")+ comp?(false)+ }+ } else {+ Log.debug("❌ No save data available")+ comp?(false)+ }++ case "saveDataWritten":+ // Auto-save triggered by game+ if let base64Data = body["data"] as? String,+ let data = Data(base64Encoded: base64Data),+ let savePath {+ try? data.write(to: URL(fileURLWithPath: savePath))+ Log.debug("✅ Auto-save updated")+ }++ case "exportSaveStateComplete":+ let success = body["success"] as? Bool ?? false+ if success, let base64Data = body["data"] as? String,+ let data = Data(base64Encoded: base64Data) {+ onExportSaveStateComplete?(data, true)+ } else {+ onExportSaveStateComplete?(nil, false)+ }++ case "importSaveStateComplete":+ let success = body["success"] as? Bool ?? false+ let error = body["error"] as? String+ onImportSaveStateComplete?(success, error)++ case "ready":+ Log.debug("✅ J2ME core ready")+ didFinishedInit?()++ case "exit":+ Log.debug("🚪 MIDlet requested exit")+ onExit?()++ default:+ break}}}@@ -202,11 +995,35 @@ extension J2MEView: WKScriptMessageHandler {// MARK: - WKNavigationDelegateextension J2MEView: WKNavigationDelegate {func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {- Log.debug("✅ WebView 加载完成")+ Log.debug("✅ WebView loaded")+ checkInitStatus()+ }++ func checkInitStatus() {+ let script: String+ switch coreType {+ case .j2meJS:+ script = "typeof window.j2me !== 'undefined'"+ case .freej2meWeb:+ script = "window.freej2meReady === true"+ }++ webView.evaluateJavaScript(script) { [weak self] result, error in+ guard let self = self else { return }+ if let isAvailable = result as? Bool, isAvailable {+ Log.debug("✅ J2ME API ready")+ // didFinishedInit is also called from the 'ready' message handler;+ // avoid calling it twice by checking here.+ } else {+ Log.debug("⚠️ J2ME API not ready, waiting...")+ DispatchQueue.main.asyncAfter(deadline: .now() + 1) {+ self.checkInitStatus()+ }+ }+ }}}// MARK: - WKUIDelegateextension J2MEView: WKUIDelegate {-}diff --git a/ManicEmu/ManicEmu/Sources/Business/Controllers/Views/ControllerMappingView.swift b/ManicEmu/ManicEmu/Sources/Business/Controllers/Views/ControllerMappingView.swiftindex 8d6be143..a000d249 100644--- a/ManicEmu/ManicEmu/Sources/Business/Controllers/Views/ControllerMappingView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Controllers/Views/ControllerMappingView.swift@@ -34,8 +34,8 @@ class ControllerMappingView: UIView {view.backgroundColor = .clearview.addTapGesture { [weak self] gesture inguard let self = self else { return }- let allGameTypes = System.allCases.filter({ $0 != .ns }).map { $0.gameType }- let itemTitles = System.allCases.filter({ $0 != .ns }).map { $0.gameType.localizedShortName }+ let allGameTypes = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType }+ let itemTitles = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType.localizedShortName }var items: [UIAction] = []let currentGameTypeName = self.gameType.localizedShortNamefor (index, title) in itemTitles.enumerated() {diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoCoverView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoCoverView.swiftindex c91a9fe7..d99138af 100644--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoCoverView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoCoverView.swift@@ -133,15 +133,11 @@ class GameInfoCoverView: BaseView {private func generateMenu() -> UIMenu {//点击选择封面照片var titles = [R.string.localizable.readyEditCoverTakePhoto(),- R.string.localizable.readyEditCoverAlbum(),- R.string.localizable.readyEditCoverFile()]+ R.string.localizable.readyEditCoverAlbum(),+ R.string.localizable.readyEditCoverFile(),+ R.string.localizable.readyEditCoverSearch()]- var symbols: [SFSymbol] = [.camera, .photoOnRectangleAngled, .folder]-- if game.gameType != .ns {- titles.append(R.string.localizable.readyEditCoverSearch())- symbols.append(.magnifyingglass)- }+ var symbols: [SFSymbol] = [.camera, .photoOnRectangleAngled, .folder, .magnifyingglass]if let _ = game.gameCover?.storedData() {titles.append(R.string.localizable.editTitle())@@ -164,10 +160,10 @@ class GameInfoCoverView: BaseView {} else if index == 2 {//文件ImageFetcher.file(completion: self.coverUpdation)- } else if game.gameType != .ns, index == 3 {+ } else if index == 3 {//搜索topViewController()?.present(GameCoverSearchViewController(game: game, completion: self.coverUpdation), animated: true)- } else if (game.gameType == .ns && index == 3) || (index == 4) {+ } else if index == 4 {//编辑if let imageData = game.gameCover?.storedData(), let image = UIImage(data: imageData) {ImageFetcher.edit(image: image, completion: self.coverUpdation)diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailReusableView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailReusableView.swiftindex 55caf8da..22a9ed09 100644--- a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailReusableView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/GameInfoDetailReusableView.swift@@ -1128,6 +1128,22 @@ class GameInfoDetailReusableView: UICollectionReusableView {return view}()+ private lazy var j2mesettingButton: SymbolButton = {+ let title = R.string.localizable.j2MESettings()+ let view = SymbolButton(image: R.image.customJava()!.applySymbolConfig(size: 30), title: title, horizontalContian: true)+ view.titleLabel.numberOfLines = 0+ view.addTapGesture { [weak self] gesture in+ guard let self = self else { return }+ if let game = self.game {+ J2MESettingView.show(game: game)+ }+ }+ view.isAccessibilityElement = true+ view.accessibilityLabel = title+ view.accessibilityTraits = .button+ return view+ }()+var didSegmentChange: ((_ index: Int)->Void)?lazy var segmentView: BetterSegmentedControl = {let titles = [R.string.localizable.readySegmentManualSave(), R.string.localizable.readySegmentAutoSave()]@@ -1208,10 +1224,12 @@ class GameInfoDetailReusableView: UICollectionReusableView {updateClownMDEmuFunctionButton()} else if game.gameType == .snes {updateSNESFunctionButton()- } else if game.gameType == .ns {+ } else if game.gameType == .ns || game.gameType == .xbox360 {updateNSFunctionButton()} else if game.isAtari {updateAtariFunctionButton()+ } else if game.isJ2MECore {+ updateJ2MEFunctionButton()}addManualsButton()hasSetupViews = true@@ -1796,6 +1814,27 @@ class GameInfoDetailReusableView: UICollectionReusableView {}}+ private func updateJ2MEFunctionButton() {+ retroButton.removeFromSuperview()+ cheatCodeButton.removeFromSuperview()+ j2mesettingButton.removeFromSuperview()++ skinButton.snp.makeConstraints { make in+ make.leading.centerY.equalToSuperview()+ make.size.equalTo(Constants.Size.IconSizeHuge)+ }++ if let lastView = functionButtonContainerView.subviews.last {+ //VRAM+ functionButtonContainerView.addSubview(j2mesettingButton)+ j2mesettingButton.snp.makeConstraints { make in+ make.leading.equalTo(lastView.snp.trailing).offset(Constants.Size.ContentSpaceMin)+ make.centerY.equalToSuperview()+ make.size.equalTo(Constants.Size.IconSizeHuge)+ make.trailing.equalToSuperview()+ }+ }+ }private func addManualsButton() {//添加游戏手册按钮diff --git a/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/J2MESettingView.swift b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/J2MESettingView.swiftnew file mode 100644index 00000000..27c90392--- /dev/null+++ b/ManicEmu/ManicEmu/Sources/Business/GameInfo/VIews/J2MESettingView.swift@@ -0,0 +1,591 @@+//+// J2MESettingView.swift+// ManicEmu+//+// Created by Daiuno on 2026/3/14.+// Copyright © 2026 Manic EMU. All rights reserved.+//++import UIKit+import IQKeyboardManagerSwift+import ProHUD+++class J2MERotationSwitchCell: UICollectionViewCell {+ var enableSwitchButton: DisabledTapSwitch = {+ let view = DisabledTapSwitch()+ view.onTintColor = Constants.Color.Main+ view.tintColor = Constants.Color.BackgroundSecondary+ return view+ }()++ override init(frame: CGRect) {+ super.init(frame: frame)++ let enableContainer: UIView = {+ let view = UIView()+ view.backgroundColor = Constants.Color.BackgroundPrimary+ view.layerCornerRadius = Constants.Size.CornerRadiusMid+ return view+ }()++ addSubview(enableContainer)+ enableContainer.snp.makeConstraints { make in+ make.leading.trailing.equalToSuperview()+ make.centerY.equalToSuperview()+ make.height.equalTo(Constants.Size.ItemHeightMax)+ }++ let enableIconView = UIImageView()+ enableIconView.contentMode = .center+ enableIconView.layerCornerRadius = 6+ enableIconView.image = UIImage(symbol: .rotateLeft, font: Constants.Font.body(size: .s, weight: .medium), color: Constants.Color.LabelPrimary.forceStyle(.dark))+ enableIconView.backgroundColor = Constants.Color.Red+ enableContainer.addSubview(enableIconView)+ enableIconView.snp.makeConstraints { make in+ make.leading.equalToSuperview().offset(Constants.Size.ContentSpaceMid)+ make.size.equalTo(Constants.Size.IconSizeMid)+ make.centerY.equalToSuperview()+ }++ let enableTitleLabel = UILabel()+ enableTitleLabel.text = R.string.localizable.rotateScreen()+ enableTitleLabel.textColor = Constants.Color.LabelPrimary+ enableTitleLabel.font = Constants.Font.body(size: .l, weight: .semibold)+ enableContainer.addSubview(enableTitleLabel)+ enableTitleLabel.snp.makeConstraints { make in+ make.centerY.equalTo(enableIconView)+ make.leading.equalTo(enableIconView.snp.trailing).offset(Constants.Size.ContentSpaceMin)+ }++ enableContainer.addSubview(enableSwitchButton)+ enableSwitchButton.snp.makeConstraints { make in+ make.centerY.equalTo(enableIconView)+ make.trailing.equalToSuperview().inset(Constants.Size.ContentSpaceMid)+ if #available(iOS 26.0, *) {+ make.size.equalTo(CGSize(width: 63, height: 28))+ } else {+ make.size.equalTo(CGSize(width: 51, height: 31))+ }+ }+ if #available(iOS 26.0, *) {} else {+ enableSwitchButton.transform = CGAffineTransformMakeScale(0.9, 0.9)+ }+ }++ required init?(coder: NSCoder) {+ fatalError("init(coder:) has not been implemented")+ }+}++class J2MEScreenSizeCell: UICollectionViewCell {++ var currentSize = J2MESize.defaultSize++ var didSetScreenSize: ((J2MESize)->Void)? = nil++ private lazy var widthTextField: UITextField = {+ let textField = UITextField()+ textField.textColor = Constants.Color.LabelSecondary+ textField.font = Constants.Font.caption(size: .l)+ textField.placeholder = R.string.localizable.width()+ textField.keyboardType = .asciiCapableNumberPad+ textField.clearButtonMode = .never+ textField.returnKeyType = .done+ textField.textAlignment = .center+ textField.onReturnKeyPress { [weak self, weak textField] in+ guard let self = self else { return }+ textField?.resignFirstResponder()+ }+ textField.onChange { [weak textField] text in+ if text.contains(".") {+ textField?.text = text.replacingOccurrences(of: ".", with: "")+ }+ if text.count > 3 {+ if let markRange = textField?.markedTextRange, let _ = textField?.position(from: markRange.start, offset: 0) { } else {+ textField?.text = String(text.prefix(3))+ }+ }+ if let num = text.int, num > 800 {+ textField?.text = "800"+ }+ }+ textField.didEndEditing { [weak self] in+ guard let self else { return }+ self.updateSize(width: self.widthTextField.text?.int ?? self.currentSize.width, height: self.heightTextField.text?.int ?? self.currentSize.height)+ }+ return textField+ }()++ private lazy var heightTextField: UITextField = {+ let textField = UITextField()+ textField.textColor = Constants.Color.LabelSecondary+ textField.font = Constants.Font.caption(size: .l)+ textField.placeholder = R.string.localizable.height()+ textField.keyboardType = .decimalPad+ textField.clearButtonMode = .never+ textField.returnKeyType = .done+ textField.textAlignment = .center+ textField.onReturnKeyPress { [weak self, weak textField] in+ guard let self = self else { return }+ textField?.resignFirstResponder()+ }+ textField.onChange { [weak textField] text in+ if text.contains(".") {+ textField?.text = text.replacingOccurrences(of: ".", with: "")+ }+ if text.count > 3 {+ if let markRange = textField?.markedTextRange, let _ = textField?.position(from: markRange.start, offset: 0) { } else {+ textField?.text = String(text.prefix(3))+ }+ }+ if let num = text.int, num > 800 {+ textField?.text = "800"+ }+ }+ textField.didEndEditing { [weak self] in+ guard let self else { return }+ self.updateSize(width: self.widthTextField.text?.int ?? self.currentSize.width, height: self.heightTextField.text?.int ?? self.currentSize.height)+ }+ return textField+ }()++ private lazy var screenSizeInputView: UIView = {+ let view = UIView()+ view.layerCornerRadius = Constants.Size.CornerRadiusMid+ view.backgroundColor = Constants.Color.Background++ let iconView = UIImageView()+ iconView.contentMode = .center+ iconView.layerCornerRadius = 6+ iconView.image = R.image.customArrowUpLeftAndArrowDownRightSquare()!.applySymbolConfig(font: Constants.Font.body(size: .s, weight: .medium), color: Constants.Color.LabelPrimary.forceStyle(.dark))+ iconView.backgroundColor = Constants.Color.Main+ view.addSubview(iconView)+ iconView.snp.makeConstraints { make in+ make.leading.equalToSuperview().offset(Constants.Size.ContentSpaceMid)+ make.size.equalTo(Constants.Size.IconSizeMid)+ make.centerY.equalToSuperview()+ }++ let titleLabel = UILabel()+ titleLabel.text = R.string.localizable.screenSize()+ titleLabel.textColor = Constants.Color.LabelPrimary+ titleLabel.font = Constants.Font.body(size: .l, weight: .semibold)+ view.addSubview(titleLabel)+ titleLabel.snp.makeConstraints { make in+ make.centerY.equalTo(iconView)+ make.leading.equalTo(iconView.snp.trailing).offset(Constants.Size.ContentSpaceMin)+ }++ view.addSubview(widthTextField)+ widthTextField.snp.makeConstraints { make in+ make.leading.greaterThanOrEqualTo(titleLabel.snp.trailing).offset(Constants.Size.ContentSpaceMin)+ make.centerY.equalToSuperview()+ make.width.equalTo(40)+ }++ let xLabel = UILabel()+ xLabel.text = "X"+ xLabel.textColor = Constants.Color.LabelSecondary+ xLabel.font = Constants.Font.caption(size: .l)+ view.addSubview(xLabel)+ xLabel.snp.makeConstraints { make in+ make.centerY.equalTo(iconView)+ make.leading.equalTo(widthTextField.snp.trailing).offset(Constants.Size.ContentSpaceUltraTiny)+ }++ view.addSubview(heightTextField)+ heightTextField.snp.makeConstraints { make in+ make.leading.equalTo(xLabel.snp.trailing).offset(Constants.Size.ContentSpaceUltraTiny)+ make.centerY.equalToSuperview()+ make.width.equalTo(40)+ }++ let chevronIconView: UIImageView = {+ let view = UIImageView()+ view.image = UIImage(symbol: .ellipsisCircle, font: Constants.Font.body(size: .l, weight: .semibold), color: Constants.Color.BackgroundSecondary)+ return view+ }()++ var moreContextMenuButton: ContextMenuButton = {+ var screenSizes = Constants.Strings.J2MEScreenSizes + [R.string.localizable.custom()]+ var actions = [UIMenuElement]()+ for (index, sizeString) in screenSizes.enumerated() {+ actions.append((UIAction(title: sizeString) { [weak self] _ in+ guard let self else { return }+ if index == screenSizes.count - 1 {+ if let text = self.widthTextField.text, text.isEmpty {+ self.widthTextField.becomeFirstResponder()+ } else if let text = self.heightTextField.text, text.isEmpty {+ self.heightTextField.becomeFirstResponder()+ } else {+ self.widthTextField.becomeFirstResponder()+ }+ } else {+ self.widthTextField.resignFirstResponder()+ self.heightTextField.resignFirstResponder()+ if let size = J2MESize(stringValue: sizeString) {+ self.updateSize(width: size.width, height: size.height)+ }+ }+ }))+ }+ let view = ContextMenuButton(image: nil, menu: UIMenu(children: actions))+ return view+ }()++ view.addSubview(chevronIconView)+ chevronIconView.snp.makeConstraints { make in+ make.centerY.equalToSuperview()+ make.leading.equalTo(heightTextField.snp.trailing).offset(Constants.Size.ContentSpaceTiny)+ make.trailing.equalToSuperview().offset(-Constants.Size.ContentSpaceMid)+ make.size.equalTo(CGSize(width: 24, height: 24))+ }++ view.addSubview(moreContextMenuButton)+ moreContextMenuButton.snp.makeConstraints { make in+ make.leading.equalTo(chevronIconView)+ make.top.bottom.trailing.equalToSuperview()+ }++ return view+ }()++ private lazy var widthSliderView: AddTriggerButtonStyleCell.SliderView = {+ let view = AddTriggerButtonStyleCell.SliderView(title: R.string.localizable.width(), valueSufix: nil, minimumValue: 96, maximumValue: 800, numberOfDecimalPlaces: -1)+ view.didChangeEnd = { [weak self ] port in+ guard let self else { return }+ self.updateSize(width: port.int, height: currentSize.height)+ }+ return view+ }()++ private lazy var heightSliderView: AddTriggerButtonStyleCell.SliderView = {+ let view = AddTriggerButtonStyleCell.SliderView(title: R.string.localizable.height(), valueSufix: nil, minimumValue: 95, maximumValue: 800, numberOfDecimalPlaces: -1)+ view.didChangeEnd = { [weak self ] port in+ guard let self else { return }+ self.updateSize(width: currentSize.width, height: port.int)+ }+ return view+ }()++ override init(frame: CGRect) {+ super.init(frame: frame)++ let containerView = UIView()+ containerView.layerCornerRadius = Constants.Size.CornerRadiusMax+ containerView.backgroundColor = Constants.Color.BackgroundPrimary+ addSubview(containerView)+ containerView.snp.makeConstraints { make in+ make.edges.equalToSuperview()+ }++ containerView.addSubview(screenSizeInputView)+ screenSizeInputView.snp.makeConstraints { make in+ make.leading.top.trailing.equalToSuperview().inset(Constants.Size.ContentSpaceMid)+ make.height.equalTo(Constants.Size.ItemHeightMax)+ }++ containerView.addSubview(widthSliderView)+ widthSliderView.snp.makeConstraints { make in+ make.leading.trailing.equalToSuperview().inset(Constants.Size.ContentSpaceMid)+ make.top.equalTo(screenSizeInputView.snp.bottom).offset(Constants.Size.ContentSpaceMax)+ make.height.equalTo(Constants.Size.ItemHeightMax)+ }++ containerView.addSubview(heightSliderView)+ heightSliderView.snp.makeConstraints { make in+ make.leading.trailing.equalToSuperview().inset(Constants.Size.ContentSpaceMid)+ make.top.equalTo(widthSliderView.snp.bottom).offset(Constants.Size.ContentSpaceMax)+ make.height.equalTo(Constants.Size.ItemHeightMax)+ }+ }++ func setData(size: J2MESize) {+ updateSize(width: size.width, height: size.height, callBlock: false)+ }++ private func updateSize(width: Int, height: Int, callBlock: Bool = true) {+ widthTextField.text = "\(width)"+ heightTextField.text = "\(height)"+ widthSliderView.value = Float(width)+ heightSliderView.value = Float(height)+ currentSize = J2MESize(width: width, height: height)+ if callBlock {+ didSetScreenSize?(currentSize)+ }+ }++ required init?(coder: NSCoder) {+ fatalError("init(coder:) has not been implemented")+ }+}++class J2MESettingView: BaseView {++ private var navigationBlurView: NavigationBlurView = {+ let view = NavigationBlurView()+ view.makeBlur()+ return view+ }()++ private lazy var collectionView: UICollectionView = {+ let view = UICollectionView(frame: .zero, collectionViewLayout: createLayout())+ view.backgroundColor = .clear+ view.contentInsetAdjustmentBehavior = .never+ view.register(cellWithClass: J2MERotationSwitchCell.self)+ view.register(cellWithClass: J2MEScreenSizeCell.self)+ view.register(supplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withClass: BackgroundColorHaderReusableView.self)+ view.register(supplementaryViewOfKind: UICollectionView.elementKindSectionFooter, withClass: BackgroundColorDetailFooterReusableView.self)+ view.showsVerticalScrollIndicator = false+ view.dataSource = self+ view.delegate = self+ view.contentInset = UIEdgeInsets(top: Constants.Size.ItemHeightMid, left: 0, bottom: UIDevice.isPad ? (Constants.Size.ContentInsetBottom + Constants.Size.HomeTabBarSize.height + Constants.Size.ContentSpaceMax) : Constants.Size.ContentInsetBottom, right: 0)+ return view+ }()++ private lazy var closeButton: SymbolButton = {+ let view = SymbolButton(image: UIImage(symbol: .xmark, font: Constants.Font.body(weight: .bold)), enableGlass: true)+ view.enableRoundCorner = true+ view.addTapGesture { [weak self] gesture in+ guard let self = self else { return }+ if PlayViewController.isGaming {+ var isChange: Bool = false+ if game.j2meScreenRotation != self.initScreenRotation {+ isChange = true+ }+ if !isChange {+ let currentSize = game.j2meScreenSize+ if currentSize.cgSize != initScreenSize.cgSize {+ isChange = true+ }+ }+ if isChange {+ UIView.makeAlert(title: R.string.localizable.headsUp(),+ detail: R.string.localizable.j2MEScreenChange(),+ cancelTitle: R.string.localizable.later(),+ confirmTitle: R.string.localizable.resetImmediately(), cancelAction: {+ self.didTapClose?()+ },confirmAction: {+ NotificationCenter.default.post(name: Constants.NotificationName.ResetImmediately, object: nil)+ })+ } else {+ self.didTapClose?()+ }+ } else {+ self.didTapClose?()+ }+ }+ return view+ }()++ ///点击关闭按钮回调+ var didTapClose: (()->Void)? = nil++ deinit {+ Log.debug("\(String(describing: Self.self)) deinit")+ Task { @MainActor in+ IQKeyboardManager.shared.isEnabled = false+ }+ }++ var game: Game+ private var initScreenRotation: Bool+ private var initScreenSize: J2MESize++ init(game: Game) {+ self.game = game+ self.initScreenRotation = game.j2meScreenRotation+ self.initScreenSize = game.j2meScreenSize+ super.init(frame: .zero)+ Log.debug("\(String(describing: Self.self)) init")+ backgroundColor = Constants.Color.Background++ IQKeyboardManager.shared.isEnabled = true+ IQKeyboardManager.shared.keyboardDistance = Constants.Size.ContentSpaceHuge++ addSubview(collectionView)+ collectionView.snp.makeConstraints { make in+ make.edges.equalToSuperview()+ }++ addSubview(navigationBlurView)+ navigationBlurView.snp.makeConstraints { make in+ make.top.equalToSuperview()+ make.leading.trailing.equalTo(self.safeAreaLayoutGuide)+ make.height.equalTo(Constants.Size.ItemHeightMid)+ }++ let icon = UIImageView(image: R.image.customJava()!.applySymbolConfig(size: 30))+ icon.contentMode = .scaleAspectFit+ navigationBlurView.addSubview(icon)+ icon.snp.makeConstraints { make in+ make.leading.equalToSuperview().offset(Constants.Size.ContentSpaceMax)+ make.size.equalTo(Constants.Size.IconSizeMin)+ make.centerY.equalToSuperview()+ }+ let headerTitleLabel = UILabel()+ headerTitleLabel.text = R.string.localizable.j2MESettings()+ headerTitleLabel.textColor = Constants.Color.LabelPrimary+ headerTitleLabel.font = Constants.Font.title(size: .s)+ navigationBlurView.addSubview(headerTitleLabel)+ headerTitleLabel.snp.makeConstraints { make in+ make.leading.equalTo(icon.snp.trailing).offset(Constants.Size.ContentSpaceUltraTiny)+ make.centerY.equalTo(icon)+ }++ navigationBlurView.addSubview(closeButton)+ closeButton.snp.makeConstraints { make in+ make.trailing.equalToSuperview().offset(-Constants.Size.ContentSpaceMax)+ make.centerY.equalToSuperview()+ make.size.equalTo(Constants.Size.ItemHeightUltraTiny)+ }+ }++ required init?(coder: NSCoder) {+ fatalError("init(coder:) has not been implemented")+ }++ private func createLayout() -> UICollectionViewLayout {+ let layout = UICollectionViewCompositionalLayout { sectionIndex, env in+ //item布局+ let item = NSCollectionLayoutItem(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1),+ heightDimension: .fractionalHeight(1)))+ let itemHeight: CGFloat+ if sectionIndex == 0 {+ itemHeight = Constants.Size.ItemHeightMax+ } else {+ itemHeight = 252+ }++ //group布局+ let group = NSCollectionLayoutGroup.horizontal(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(itemHeight)), subitems: [item])+ group.contentInsets = NSDirectionalEdgeInsets(top: 0,+ leading: Constants.Size.ContentSpaceMid,+ bottom: 0,+ trailing: Constants.Size.ContentSpaceMid)++ //section布局+ let section = NSCollectionLayoutSection(group: group)+ section.contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 0, bottom: Constants.Size.ContentSpaceMin, trailing: 0)++ //header布局+ let headerItem = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1),+ heightDimension: .absolute(44)),+ elementKind: UICollectionView.elementKindSectionHeader,+ alignment: .top)+ headerItem.pinToVisibleBounds = true+ section.boundarySupplementaryItems = [headerItem]++ if sectionIndex != 0 {+ let footerItem = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: NSCollectionLayoutSize(widthDimension: .fractionalWidth(1),+ heightDimension: .estimated(44)),+ elementKind: UICollectionView.elementKindSectionFooter,+ alignment: .bottom)+ section.boundarySupplementaryItems.append(footerItem)+ }++ return section+ }+ return layout+ }+}++extension J2MESettingView: UICollectionViewDataSource {+ func numberOfSections(in collectionView: UICollectionView) -> Int {+ return 2+ }++ func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {+ return 1+ }++ func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {+ if indexPath.section == 0 {+ let cell = collectionView.dequeueReusableCell(withClass: J2MERotationSwitchCell.self, for: indexPath)+ cell.enableSwitchButton.setOn(game.j2meScreenRotation, animated: false)+ cell.enableSwitchButton.onChange { [weak self] value in+ guard let self else { return }+ self.game.updateExtra(key: ExtraKey.j2meScreenRotate.rawValue, value: value)+ }+ return cell+ } else {+ let cell = collectionView.dequeueReusableCell(withClass: J2MEScreenSizeCell.self, for: indexPath)+ cell.setData(size: game.j2meScreenSize)+ cell.didSetScreenSize = { [weak self] size in+ guard let self else { return }+ self.game.updateExtra(key: ExtraKey.j2meScreenSize.rawValue, value: size.stringValue)+ }+ return cell+ }+ }++ func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {+ if kind == UICollectionView.elementKindSectionHeader {+ let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withClass: BackgroundColorHaderReusableView.self, for: indexPath)+ header.titleLabel.text = indexPath.section == 0 ? R.string.localizable.rotateScreen() : R.string.localizable.screenSize()+ return header+ } else {+ let footer = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withClass: BackgroundColorDetailFooterReusableView.self, for: indexPath)+ footer.titleLabel.text = R.string.localizable.j2MESettingsTips()+ return footer+ }+ }+}++extension J2MESettingView: UICollectionViewDelegate {+ func scrollViewDidScroll(_ scrollView: UIScrollView) {+ collectionView.endEditing(true)+ }+}++extension J2MESettingView {+ static var isShow: Bool {+ Sheet.find(identifier: String(describing: J2MESettingView.self)).count > 0 ? true : false+ }++ static func show(game: Game, hideCompletion: (()->Void)? = nil) {+ Sheet.lazyPush(identifier: String(describing: J2MESettingView.self)) { sheet in+ sheet.configGamePlayingStyle(hideCompletion: hideCompletion)++ let view = UIView()+ let containerView = RoundAndBorderView(roundCorner: (UIDevice.isPad || UIDevice.isLandscape || PlayViewController.menuInsets != nil) ? .allCorners : [.topLeft, .topRight])+ containerView.backgroundColor = Constants.Color.Background+ view.addSubview(containerView)+ containerView.snp.makeConstraints { make in+ make.edges.equalToSuperview()+ if let maxHeight = sheet.config.cardMaxHeight {+ make.height.equalTo(maxHeight)+ }+ }+ view.addPanGesture { [weak view, weak sheet] gesture in+ guard let view = view, let sheet = sheet else { return }+ let point = gesture.translation(in: gesture.view)+ view.transform = .init(translationX: 0, y: point.y <= 0 ? 0 : point.y)+ if gesture.state == .recognized {+ let v = gesture.velocity(in: gesture.view)+ if (view.y > view.height*2/3 && v.y > 0) || v.y > 1200 {+ // 达到移除的速度+ sheet.pop()+ }+ UIView.animate(withDuration: 0.8, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.5, options: [.allowUserInteraction, .curveEaseOut], animations: {+ view.transform = .identity+ })+ }+ }++ let j2MESettingView = J2MESettingView(game: game)+ j2MESettingView.didTapClose = { [weak sheet] in+ sheet?.pop()+ }+ containerView.addSubview(j2MESettingView)+ j2MESettingView.snp.makeConstraints { make in+ make.edges.equalToSuperview()+ }++ sheet.set(customView: view).snp.makeConstraints { make in+ make.edges.equalToSuperview()+ }+ }+ }+}diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swiftindex 5aee6020..f24945c1 100644--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameCoverView.swift@@ -231,6 +231,10 @@ class GameCoverView: UIView {image = style == .style2 ? R.image.jaguar_cover_v() : R.image.jaguar_cover_h()} else if gameType == .lynx {image = style == .style2 ? R.image.lynx_cover_v() : R.image.lynx_cover_h()+ } else if gameType == .xbox360 {+ image = style == .style2 ? R.image.xbox360_cover_v() : R.image.xbox360_cover_h()+ } else if gameType == .j2me {+ image = style == .style2 ? R.image.j2me_cover_v() : R.image.j2me_cover_h()}if UIDevice.isPhone, !UIDevice.isLandscape, scalePlatform, Constants.Size.GamesPerRow != 2, let unwrapImage = image {image = unwrapImage.scaled(toWidth: unwrapImage.size.width * (1/(Constants.Size.GamesPerRow-1)))diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameEditToolBar.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameEditToolBar.swiftindex c9c1f8e5..908f73c0 100644--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameEditToolBar.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameEditToolBar.swift@@ -65,7 +65,7 @@ enum GameEditToolItem: SettingCellItem, CaseIterable {var enableLongPress: Bool { false }func support(for gameType: GameType) -> Bool {- if gameType == .ns {+ if gameType == .ns || gameType == .xbox360 {switch self {case .rename, .cover, .delete:return truediff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swiftindex e00750cd..929e23f9 100644--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameListView.swift@@ -619,14 +619,14 @@ class GameListView: BaseView {var games: [Game] = []if let indexPath = indexPath, let game = self.getGame(at: indexPath) {if !item.support(for: game.gameType) {- UIView.makeToast(message: R.string.localizable.notSupportGameSetting(GameType.ns.localizedShortName))+ UIView.makeToast(message: R.string.localizable.notSupportGameSetting(game.gameType.localizedShortName))return}games.append(game)} else if let tempIndexPaths = collectionView.indexPathsForSelectedItems {games.append(contentsOf: tempIndexPaths.compactMap({ getGame(at: $0) }))if games.count == 1, !item.support(for: games.first!.gameType) {- UIView.makeToast(message: R.string.localizable.notSupportGameSetting(GameType.ns.localizedShortName))+ UIView.makeToast(message: R.string.localizable.notSupportGameSetting(games.first!.gameType.localizedShortName))return}} else {@@ -707,19 +707,25 @@ class GameListView: BaseView {SyncManager.delete(localFilePath: game.romUrl.path)}}- if game.isSaveExtsts {- if game.gameType == .psp, let code = game.gameCodeForPSP {- //psp的存档可能分为多个文件夹- try? FileManager.default.contentsOfDirectory(atPath: Constants.Path.PSPSave).filter({ $0.hasPrefix(code)}).forEach { savePath in- let deletePath = Constants.Path.PSPSave.appendingPathComponent(savePath)- try? FileManager.safeRemoveItem(at: URL(fileURLWithPath: deletePath))- SyncManager.deletePath(localPath: deletePath)++ if game.gameType == .j2me {+ game.deleteJ2meSaves()+ } else {+ if game.isSaveExtsts {+ if game.gameType == .psp, let code = game.gameCodeForPSP {+ //psp的存档可能分为多个文件夹+ try? FileManager.default.contentsOfDirectory(atPath: Constants.Path.PSPSave).filter({ $0.hasPrefix(code)}).forEach { savePath in+ let deletePath = Constants.Path.PSPSave.appendingPathComponent(savePath)+ try? FileManager.safeRemoveItem(at: URL(fileURLWithPath: deletePath))+ SyncManager.deletePath(localPath: deletePath)+ }+ } else {+ try FileManager.safeRemoveItem(at: game.gameSaveUrl)+ SyncManager.delete(localFilePath: game.gameSaveUrl.path)}- } else {- try FileManager.safeRemoveItem(at: game.gameSaveUrl)- SyncManager.delete(localFilePath: game.gameSaveUrl.path)}}+if let coverData = game.gameCover {coverData.deleteAndClean(realm: realm)}@@ -1128,7 +1134,7 @@ extension GameListView: UICollectionViewDelegate {guard let self = self else { return }self.editGame(item: editItems[index], indexPath: indexPath)}- if game.gameType == .ns {+ if game.gameType == .ns || game.gameType == .xbox360 {if editItem == .rename {firstGroup.append(action)} else if editItem == .cover {@@ -1218,7 +1224,13 @@ extension GameListView: UICollectionViewDelegate {//添加"复制启动链接"let action = UIAction(title: R.string.localizable.copyLaunchLinkTitle(), image: .symbolImage(.link)) { _ in- UIPasteboard.general.string = (game.gameType == .ns ? Constants.URLs.MeloNXGameLaunch(gameId: game.id).absoluteString : "manicemu://launch/\(game.id)")+ if game.gameType == .ns {+ UIPasteboard.general.string = Constants.URLs.MeloNXGameLaunch(gameId: game.id).absoluteString+ } else if game.gameType == .xbox360 {+ UIPasteboard.general.string = Constants.URLs.XeniOSGameLaunch(gameId: game.id).absoluteString+ } else {+ UIPasteboard.general.string = "manicemu://launch/\(game.id)"+ }if game.gameCover != nil || game.onlineCoverUrl != nil {//弹出提示询问用户是否需要进行封面的保存UIView.makeAlert(detail: R.string.localizable.askIfNeedToSaveCover(), confirmTitle: R.string.localizable.saveTitle(), confirmAction: {diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameplayManualsView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameplayManualsView.swiftindex 5036e390..c3ba3779 100644--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameplayManualsView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GameplayManualsView.swift@@ -175,7 +175,7 @@ extension GameplayManualsView {}static func show(game: Game, hideCompletion: (()->Void)? = nil) {- Sheet { sheet in+ Sheet.lazyPush(identifier: String(describing: GameplayManualsView.self)) { sheet insheet.configGamePlayingStyle(hideCompletion: hideCompletion)let view = UIView()diff --git a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GamesCollectionReusableView.swift b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GamesCollectionReusableView.swiftindex 68b8d232..d297ef9e 100644--- a/ManicEmu/ManicEmu/Sources/Business/Games/Views/GamesCollectionReusableView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Games/Views/GamesCollectionReusableView.swift@@ -212,6 +212,10 @@ class GamesCollectionReusableView: UICollectionReusableView {image = R.image.jaguar_group_brand(compatibleWith: traitCollection)} else if gameType == .lynx {image = R.image.lynx_group_brand(compatibleWith: traitCollection)+ } else if gameType == .xbox360 {+ image = R.image.xbox360_group_brand(compatibleWith: traitCollection)+ } else if gameType == .j2me {+ image = R.image.j2me_group_brand(compatibleWith: traitCollection)}Self.brandImageCaches[key] = imagereturn imagediff --git a/ManicEmu/ManicEmu/Sources/Business/Import/Views/GameSaveMatchGameView.swift b/ManicEmu/ManicEmu/Sources/Business/Import/Views/GameSaveMatchGameView.swiftindex 805e8a86..de74b0a6 100644--- a/ManicEmu/ManicEmu/Sources/Business/Import/Views/GameSaveMatchGameView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Import/Views/GameSaveMatchGameView.swift@@ -385,7 +385,7 @@ class GameSaveMatchGameView: BaseView {extension GameSaveMatchGameView: UICollectionViewDataSource {private func sortDatasKeys() -> [GameType] {- let predefinedOrder: [GameType] = System.allCases.filter({ $0 != .ns }).map { $0.gameType }+ let predefinedOrder: [GameType] = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType }let sortedKeys: [GameType] = predefinedOrder.filter { normalDatas.keys.contains($0) }return sortedKeys}diff --git a/ManicEmu/ManicEmu/Sources/Business/Import/Views/ImportServiceListView.swift b/ManicEmu/ManicEmu/Sources/Business/Import/Views/ImportServiceListView.swiftindex af39a258..b49327fc 100644--- a/ManicEmu/ManicEmu/Sources/Business/Import/Views/ImportServiceListView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Import/Views/ImportServiceListView.swift@@ -33,7 +33,11 @@ class ImportServiceListView: BaseView {}))actions.append((UIAction(title: R.string.localizable.fetchGamesFromMeloNX(), image: UIImage(symbol: .gamecontroller)) { [weak self] _ inguard let self = self else { return }- MeloNXKit.fetchGames()+ EmulatorInteractionKit.fetchGames(type: .meloNX)+ }))+ actions.append((UIAction(title: R.string.localizable.fetchGamesFromXeniOS(), image: UIImage(symbol: .gamecontroller)) { [weak self] _ in+ guard let self = self else { return }+ EmulatorInteractionKit.fetchGames(type: .xeniOS)}))let view = ContextMenuButton(image: nil, menu: UIMenu(children: actions))return viewdiff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swiftindex f1a9393e..624e3103 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Models/Game.swift@@ -194,6 +194,8 @@ class Game: Object, ObjectUpdatable {}} else if gameType == .lynx {return URL(fileURLWithPath: Constants.Path.Holani.appendingPathComponent("\(name).srm"))+ } else if gameType == .j2me {+ return URL(fileURLWithPath: Constants.Path.Data.appendingPathComponent("\(name).\(defaultCore == 0 ? LibretroCore.Cores.J2meJS.name : LibretroCore.Cores.freej2me.name).\(gameType.manicEmuCore?.gameSaveExtension ?? "")"))}let localUrl = URL(fileURLWithPath: Constants.Path.Data.appendingPathComponent("\(name).\(gameType.manicEmuCore?.gameSaveExtension ?? "")"))@@ -503,6 +505,9 @@ class Game: Object, ObjectUpdatable {if isJGenesisCore {return false}+ if isJ2MECore {+ return false+ }return true}@@ -657,7 +662,7 @@ class Game: Object, ObjectUpdatable {}var isLibretroType: Bool {- if isCitra3DS || isJGenesisCore {+ if isCitra3DS || isJGenesisCore || isJ2MECore {return false}return true@@ -674,7 +679,11 @@ class Game: Object, ObjectUpdatable {var isJGenesisCore: Bool {return ((gameType == ._32x || gameType == .mcd) && defaultCore == 1)}-++ var isJ2MECore: Bool {+ return gameType == .j2me+ }+var coreNameForMultiSupport: String {if gameType.supportCores.count > 0, defaultCore < gameType.supportCores.count {return "(\(gameType.supportCores[defaultCore]))"@@ -709,6 +718,36 @@ class Game: Object, ObjectUpdatable {processSave()}}++ var screenScaling: GameSetting.ScreenScaling {+ if let scalingInt = getExtraInt(key: ExtraKey.screenScaling.rawValue),+ let scaling = GameSetting.ScreenScaling(rawValue: scalingInt) {+ return scaling+ }+ return .stretch+ }++ var j2meScreenSize: J2MESize {+ if let sizeString = getExtraString(key: ExtraKey.j2meScreenSize.rawValue),+ let size = J2MESize(stringValue: sizeString) {+ return size+ }+ return J2MESize.defaultSize+ }++ var j2meScreenRotation: Bool {+ getExtraBool(key: ExtraKey.j2meScreenRotate.rawValue) ?? false+ }++ func deleteJ2meSaves() {+ let j2mejsUrl = URL(fileURLWithPath: Constants.Path.Data.appendingPathComponent("\(name).\(LibretroCore.Cores.J2meJS.name).\(gameType.manicEmuCore?.gameSaveExtension ?? "")"))+ try? FileManager.safeRemoveItem(at: j2mejsUrl)+ SyncManager.delete(localFilePath: j2mejsUrl.path)++ let freej2meUrl = URL(fileURLWithPath: Constants.Path.Data.appendingPathComponent("\(name).\(LibretroCore.Cores.freej2me.name).\(gameType.manicEmuCore?.gameSaveExtension ?? "")"))+ try? FileManager.safeRemoveItem(at: freej2meUrl)+ SyncManager.delete(localFilePath: freej2meUrl.path)+ }}diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Models/GameSetting.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Models/GameSetting.swiftindex f16dac85..9ec7578b 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/Models/GameSetting.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Models/GameSetting.swift@@ -430,6 +430,24 @@ struct GameSetting: SettingCellItem {}}+ enum ScreenScaling: Int, CaseIterable {+ case stretch, fit+ var title: String {+ switch self {+ case .stretch: R.string.localizable.screenScalingStretch()+ case .fit: R.string.localizable.screenScalingFit()+ }+ }++ var next: ScreenScaling {+ if let type = ScreenScaling(rawValue: self.rawValue + 1) {+ return type+ } else {+ return .stretch+ }+ }+ }+enum MappingOnlyType: Int, CaseIterable, SettingCellItem {case holdX2FastForward, holdX3FastForward, holdX4FastForward, holdMaxFastForward@@ -484,7 +502,7 @@ struct GameSetting: SettingCellItem {enum ItemType: Int, CaseIterable {//位置很重要 新增内容一定要接到最后面- case saveState, quickLoadState, volume, fastForward, stateList, cheatCode, skins, filter, screenShot, haptic, airplay, controllerSetting, orientation, functionSort, reload, quit, swapScreen, resolution, consoleHome, amiibo, toggleFullscreen, simBlowing, palette, swapDisk, retro, airPlayScaling, airPlayLayout, toggleAnalog, gameplayManuals, triggerPro+ case saveState, quickLoadState, volume, fastForward, stateList, cheatCode, skins, filter, screenShot, haptic, airplay, controllerSetting, orientation, functionSort, reload, quit, swapScreen, resolution, consoleHome, amiibo, toggleFullscreen, simBlowing, palette, swapDisk, retro, airPlayScaling, airPlayLayout, toggleAnalog, gameplayManuals, triggerPro, screenScaling, j2meSettings}var type: ItemType@@ -503,6 +521,7 @@ struct GameSetting: SettingCellItem {var mappingOnlyType: MappingOnlyType? = nilvar nesPalette = Game.defaultNesPalettevar triggerProID: Int? = nil+ var screenScaling: ScreenScaling = .stretchvar image: UIImage {switch type {@@ -570,6 +589,10 @@ struct GameSetting: SettingCellItem {UIImage(symbol: .textBookClosed)case .triggerPro:R.image.customXmarkTriangleCircleSquare()!.applySymbolConfig()+ case .screenScaling:+ UIImage(symbol: .arrowUpRightAndArrowDownLeftRectangle)+ case .j2meSettings:+ R.image.customJava()!.applySymbolConfig(size: 30)}}@@ -639,6 +662,10 @@ struct GameSetting: SettingCellItem {R.string.localizable.gameplayManuals()case .triggerPro:"TriggerPro"+ case .screenScaling:+ R.string.localizable.screenScaling()+ case .j2meSettings:+ R.string.localizable.j2MESettings()}}@@ -655,7 +682,32 @@ struct GameSetting: SettingCellItem {return gameType == .ps1}+ if type == .j2meSettings {+ return gameType == .j2me+ }+switch gameType {+ case .j2me:+ if type == .saveState ||+ type == .quickLoadState ||+ (type == .fastForward && defaultCore == 1) ||+ type == .stateList ||+ type == .cheatCode ||+ type == .filter ||+ type == .swapScreen ||+ type == .resolution ||+ type == .consoleHome ||+ type == .amiibo ||+ type == .simBlowing ||+ type == .palette ||+ type == .swapDisk ||+ type == .retro ||+ type == .airPlayLayout ||+ type == .toggleAnalog {+ return false+ }+ return true+case .a2600, .a5200, .a7800, .lynx, .jaguar:if gameType == .a5200, type == .retro {return false@@ -671,7 +723,7 @@ struct GameSetting: SettingCellItem {return truecase ._3ds:if defaultCore == 0 {- if type == .fastForward || type == .filter || type == .palette || type == .swapDisk || type == .retro || type == .airPlayScaling {+ if type == .fastForward || type == .filter || type == .palette || type == .swapDisk || type == .retro || type == .airPlayScaling || type == .screenScaling {return false}} else {@@ -692,7 +744,7 @@ struct GameSetting: SettingCellItem {if gameType == ._32x || gameType == .mcd {//JGenesis核心- let notEnableForJGenesis = (type == .cheatCode || type == .filter || type == .retro || type == .swapDisk)+ let notEnableForJGenesis = (type == .cheatCode || type == .filter || type == .retro || type == .swapDisk || type == .screenScaling)if defaultCore == 1 && notEnableForJGenesis {return false}@@ -745,7 +797,7 @@ struct GameSetting: SettingCellItem {var enableLongPress: Bool {switch self.type {- case .quickLoadState, .fastForward, .haptic, .orientation, .resolution, .palette, .swapDisk, .airPlayScaling, .airPlayLayout, .triggerPro:+ case .quickLoadState, .fastForward, .haptic, .orientation, .resolution, .palette, .swapDisk, .airPlayScaling, .airPlayLayout, .triggerPro, .screenScaling:return truedefault:return false@@ -818,6 +870,10 @@ struct GameSetting: SettingCellItem {return "gameplayManuals"case .triggerPro:return "triggerPro"+ case .screenScaling:+ return "screenScaling"+ case .j2meSettings:+ return "j2meSettings"}}diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swiftindex ad7e0c6e..34e56954 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/VIewControllers/PlayViewController.swift@@ -48,6 +48,7 @@ class PlayViewController: GameViewController {private var turnOffHardcoreNotification: Any? = nilprivate var turnOffAlwaysShowProgressNotification: Any? = nilprivate var mameGameFileMissingNotification: Any? = nil+ private var resetGamingNotification: Any? = nil//每分钟执行一次private lazy var repeatTimer: Schedule.Task = {@@ -95,6 +96,13 @@ class PlayViewController: GameViewController {}return nil}+ //J2ME核心+ private var j2meCore: J2MEView? {+ if manicGame.isJ2MECore {+ return gameMetalView as? J2MEView+ }+ return nil+ }//监听静音键变化private lazy var muteSwitchMonitor = DLTAMuteSwitchMonitor()//kvo监听@@ -187,6 +195,9 @@ class PlayViewController: GameViewController {if SyncManager.shared.hasDownloadTask {UIView.makeLoadingToast(message: R.string.localizable.loadingTitle())}+ if let resetGamingNotification {+ NotificationCenter.default.removeObserver(resetGamingNotification)+ }}//数据库变化通知@@ -215,7 +226,10 @@ class PlayViewController: GameViewController {static func startGame(game: Game, saveState: GameSaveState? = nil) {if game.gameType == .ns {- MeloNXKit.startGame(id: game.id)+ EmulatorInteractionKit.startGame(type: .meloNX, id: game.id)+ return+ } else if game.gameType == .xbox360 {+ EmulatorInteractionKit.startGame(type: .xeniOS, id: game.id)return}@@ -299,6 +313,15 @@ class PlayViewController: GameViewController {}, hideAction: {UserDefaults.standard.set(true, forKey: Constants.DefaultKey.HasShowSSPlayAlert)});+ } else if game.gameType == .j2me, game.defaultCore == 1, !UserDefaults.standard.bool(forKey: Constants.DefaultKey.HasShowFreeJ2meAlert) {+ UIView.makeAlert(title: R.string.localizable.headsUp(),+ detail: R.string.localizable.freej2meAlert(),+ detailAlignment: .left,+ cancelTitle: R.string.localizable.confirmTitle(),+ cancelAction: {+ UserDefaults.standard.set(true, forKey: Constants.DefaultKey.HasShowFreeJ2meAlert)+ showPlayView()+ });} else {showPlayView()}@@ -604,6 +627,13 @@ class PlayViewController: GameViewController {UIView.makeAlert(title: R.string.localizable.mameFileMissingTitle(), detail: R.string.localizable.mameFileMissingDesc(), cancelTitle: R.string.localizable.confirmTitle())}+ //重置游戏通知+ quitGamingNotification = NotificationCenter.default.addObserver(forName: Constants.NotificationName.ResetImmediately, object: nil, queue: .main, using: { [weak self] notification in+ guard let self else { return }+ UIView.hideAllAlert()+ self.handleMenuGameSetting(GameSetting(type: .reload), nil)+ })+//更新最新游戏时间updateLatestPlayDate()@@ -703,6 +733,8 @@ class PlayViewController: GameViewController {functionButtonContainer.snp.makeConstraints { make inif manicGame.gameType == .n64 && UIDevice.isPad {make.top.equalTo(gameView.snp.bottom).offset(-9)+ } else if manicGame.gameType == .j2me {+ make.top.equalTo(gameView.snp.bottom).offset(2)} else {make.top.equalTo(gameView.snp.bottom)}@@ -711,7 +743,12 @@ class PlayViewController: GameViewController {} else {make.leading.trailing.equalTo(gameView)}- make.height.equalTo(Constants.Size.ItemHeightMid)+ if manicGame.gameType == .j2me {+ make.height.equalTo(30)+ } else {+ make.height.equalTo(Constants.Size.ItemHeightMid)+ }+}//设置外设控制器updateExternalGameController()@@ -764,7 +801,7 @@ class PlayViewController: GameViewController {repeatTimer.suspend()//清理AirPlay画面if let airPlayViewController = ExternalSceneDelegate.airPlayViewController, let airPlayGameView = airPlayViewController.libretroView {- if manicGame.isLibretroType || manicGame.isJGenesisCore {+ if manicGame.isLibretroType || manicGame.isJGenesisCore || manicGame.isJ2MECore {airPlayGameView.parentViewController?.removeFromParent()airPlayGameView.removeFromSuperview()airPlayViewController.libretroView = nil@@ -879,6 +916,9 @@ class PlayViewController: GameViewController {} else if manicGame.isJGenesisCore {jGenesisCore?.pause()return true+ } else if manicGame.isJ2MECore {+ j2meCore?.pause()+ return true} else {return super.pauseEmulation()}@@ -1094,7 +1134,7 @@ extension PlayViewController {UIView.makeToast(message: R.string.localizable.gameSaveStateQuickLoadFailed())}}-+private func quickLoadStateForJGenesis(_ state: GameSaveState?) {let now = Date.nowif let lastLoadDate = lastLoadDate, now.timeIntervalSince1970ms - lastLoadDate.timeIntervalSince1970ms < 1000 {@@ -1122,7 +1162,7 @@ extension PlayViewController {}}-+private func handleGameInput(_ inputStringValue: String) {let input = SomeInput(stringValue: inputStringValue, intValue: nil, type: .controller(.controllerSkin))//点击menu弹出菜单@@ -1205,6 +1245,8 @@ extension PlayViewController {}} else if manicGame.isJGenesisCore {updateFlex(images: [jGenesisCore?.snapShot()])+ } else if manicGame.isJ2MECore {+ updateFlex(images: [j2meCore?.snapShot()])} else {let mainGameView = gameViews.first!let secondGameView: GameView? = gameViews.count > 1 ? gameViews[1] : nil@@ -1302,9 +1344,9 @@ extension PlayViewController {} else if input.stringValue == "retroAchievements" {handleMenuGameSetting(GameSetting(type: .retro), nil)} else if input.stringValue == "airPlayScaling" {- handleMenuGameSetting(GameSetting(type: .retro, airPlayScaling: Settings.defalut.airPlayScaling.next), nil)+ handleMenuGameSetting(GameSetting(type: .airPlayScaling, airPlayScaling: Settings.defalut.airPlayScaling.next), nil)} else if input.stringValue == "airPlayLayout" {- handleMenuGameSetting(GameSetting(type: .retro, airPlayLayout: Settings.defalut.airPlayLayout.next), nil)+ handleMenuGameSetting(GameSetting(type: .airPlayLayout, airPlayLayout: Settings.defalut.airPlayLayout.next), nil)} else if input.stringValue == "gameplayManuals" {handleMenuGameSetting(GameSetting(type: .gameplayManuals), nil)} else if input.stringValue == "triggerPro" {@@ -1321,6 +1363,10 @@ extension PlayViewController {update2600LeftDifficulty(isInit: false)} else if input.stringValue == "rightDifficulty" {update2600RightDifficulty(isInit: false)+ } else if input.stringValue == "screenScaling" {+ handleMenuGameSetting(GameSetting(type: .screenScaling, screenScaling: manicGame.screenScaling.next), nil)+ } else if input.stringValue == "j2meSettings" {+ handleMenuGameSetting(GameSetting(type: .j2meSettings), nil)}}@@ -1628,6 +1674,11 @@ extension PlayViewController {PhotoSaver.save(image: image)}return false+ } else if manicGame.isJ2MECore {+ if let image = j2meCore?.snapShot() {+ PhotoSaver.save(image: image)+ }+ return false} else {PhotoSaver.save(datas: gameViews.compactMap { $0.snapshot()?.processGameSnapshop() })return false@@ -1713,6 +1764,15 @@ extension PlayViewController {updateFilter()} else if manicGame.isJGenesisCore {jGenesisCore?.reset()+ } else if manicGame.isJ2MECore {+ j2meCore?.reset(screenSize: manicGame.j2meScreenSize, rotation: manicGame.j2meScreenRotation) { [weak self] success in+ guard let self = self else { return }+ if success {+ self.updateFastforward(speed: self.manicGame.speed)+ self.updateAudio()+ self.updateScreenScaling(self.manicGame.screenScaling)+ }+ }}case .quit://MARK: handleMenuGameSetting.quit@@ -1732,6 +1792,11 @@ extension PlayViewController {DispatchQueue.main.asyncAfter(delay: 0.5) {self.dismiss(animated: true)}+ } else if manicGame.isJ2MECore {+ gameMetalView = nil+ DispatchQueue.main.asyncAfter(delay: 0.5) {+ self.dismiss(animated: true)+ }}case .resolution://MARK: handleMenuGameSetting.resolution@@ -2058,6 +2123,19 @@ extension PlayViewController {}self.updateTriggerPro(showToast: true)return true++ case .screenScaling:+ //MARK: handleMenuGameSetting.screenScaling+ if item.screenScaling != manicGame.screenScaling {+ manicGame.updateExtra(key: ExtraKey.screenScaling.rawValue, value: item.screenScaling.rawValue)+ updateScreenScaling(item.screenScaling)+ }+ UIView.makeToast(message: R.string.localizable.screenScaling() + ": " + item.screenScaling.title)++ case .j2meSettings:+ //MARK: handleMenuGameSetting.j2meSettings+ J2MESettingView.show(game: manicGame)+ return false}//默认关闭菜单return true@@ -2113,9 +2191,12 @@ extension PlayViewController {} else if manicGame.isJGenesisCore {jGenesisCore?.resume()updateAudio()+ } else if manicGame.isJ2MECore {+ j2meCore?.resume()+ updateAudio()}}-+private func updateAudio() {if manicGame.isCitra3DS {if manicGame.volume {@@ -2139,6 +2220,12 @@ extension PlayViewController {} else {jGenesisCore?.setMute(!manicGame.volume)}+ } else if manicGame.isJ2MECore {+ if Settings.defalut.respectSilentMode, muteSwitchMonitor.isMonitoring, muteSwitchMonitor.isMuted {+ j2meCore?.setMute(true)+ } else {+ j2meCore?.setMute(!manicGame.volume)+ }}}@@ -2241,13 +2328,15 @@ extension PlayViewController {}} else if manicGame.isJGenesisCore {-++ } else if manicGame.isJ2MECore {+ // J2ME does not support cheat codes}}-+private func updateFilter() {guard !manicGame.safeMode else { return }- guard !manicGame.isCitra3DS, !manicGame.isJGenesisCore else { return }+ guard !manicGame.isCitra3DS, !manicGame.isJGenesisCore, !manicGame.isJ2MECore else { return }if manicGame.isLibretroType {//Libretro filterName是滤镜的路径@@ -2678,6 +2767,9 @@ extension PlayViewController {skinSwitchBindDatas["reverseScreens"] = manicGame.swapScreenskinSwitchBindDatas["volume"] = manicGame.volumeskinSwitchBindDatas["toggleControlls"] = manicGame.forceFullSkin++ //配置屏幕的拉伸模式+ updateScreenScaling(manicGame.screenScaling)}private func loadMinimalConfig() {@@ -2964,6 +3056,9 @@ extension PlayViewController {skinSwitchBindDatas["reverseScreens"] = manicGame.swapScreenskinSwitchBindDatas["volume"] = manicGame.volumeskinSwitchBindDatas["toggleControlls"] = manicGame.forceFullSkin++ //配置屏幕的拉伸模式+ updateScreenScaling(manicGame.screenScaling)}//更新皮肤@@ -3048,7 +3143,9 @@ extension PlayViewController {updateCitra3DSViews()//更新JGenesis画面updateJGenesisView()-+ //更新J2ME画面+ updateJ2MEView()+if controllerView.isIncludeSwitch {controllerView.updateSwitchState(skinSwitchBindDatas)}@@ -3144,8 +3241,8 @@ extension PlayViewController {/// 更新AirPlayprivate func updateAirPlay() {guard !manicGame.isCitra3DS else { return }-- if manicGame.isLibretroType || manicGame.isJGenesisCore {++ if manicGame.isLibretroType || manicGame.isJGenesisCore || manicGame.isJ2MECore {if PurchaseManager.isMember, Settings.defalut.airPlay, ExternalSceneDelegate.isAirPlaying {//执行全屏投屏if let airPlayViewController = ExternalSceneDelegate.airPlayViewController, let gameMetalView {@@ -3508,7 +3605,83 @@ extension PlayViewController {}}}-++ private func updateJ2MEView() {+ guard manicGame.isJ2MECore else { return }+ if let gameMetalView {+ if gameMetalView.superview == view {+ gameMetalView.snp.remakeConstraints { make in+ make.edges.equalTo(gameView)+ }+ }+ } else {+ //允许点击穿透+ controllerView.allowTapThroughIfButtonNotHit = true++ let j2meView = J2MEView(coreType: manicGame.defaultCore == 0 ? .j2meJS : .freej2meWeb)+ gameMetalView = j2meView+ guard let gameMetalView else { return }+ self.view.insertSubview(gameMetalView, belowSubview: controllerView)+ gameMetalView.snp.makeConstraints { make in+ make.edges.equalTo(self.gameView)+ }+ gameMetalView.isHidden = true++ j2meView.onExit = { [weak self] in+ guard let self = self else { return }+ self.handleMenuGameSetting(GameSetting(type: .quit), nil)+ }++ var loadSuccess = false+ let group = DispatchGroup()+ group.enter()+ j2meView.didFinishedInit = { [weak self] in+ loadSuccess = true+ group.leave()+ UIView.hideLoading()+ guard let self = self else { return }+ self.j2meCore?.openJar(filePath: self.manicGame.romUrl.path,+ savePath: self.manicGame.gameSaveUrl.path,+ screenSize: self.manicGame.j2meScreenSize,+ rotation: self.manicGame.j2meScreenRotation) { [weak self] success in+ guard let self = self else { return }+ if success {+ self.updateFastforward(speed: self.manicGame.speed)+ self.updateAudio()+ self.updateScreenScaling(self.manicGame.screenScaling)+ }+ }++ self.gameMetalView?.isHidden = false+ self.updateAirPlay()+ }++ if manicGame.defaultCore == 1 {+ //freej2me的CheerpJ可能加载很长时间+ DispatchQueue.main.asyncAfter(delay: 3) {+ if !loadSuccess {+ UIView.makeLoadingToast(message: R.string.localizable.loadingCheerpJ())+ UIView.makeLoading(timeout: 30)+ DispatchQueue.global().async {+ let result = group.wait(timeout: .now() + 30)+ DispatchQueue.main.async {+ if result == .success {+ UIView.hideLoadingToast()+ UIView.hideLoading()+ } else {+ UIView.hideLoadingToast()+ UIView.makeAlert(detail: R.string.localizable.cheerpJLoadFailed(),+ detailAlignment: .left,+ cancelTitle: R.string.localizable.confirmTitle())+ }+ }+ }+ }+ }+ }+ }+ }+private func updateDualScreenViews() {guard manicGame.gameType == .ds || manicGame.isAzahar3DS else { return }@@ -4135,6 +4308,19 @@ extension PlayViewController {case .five:jGenesisCore?.fastForward(speed: 7)}+ } else if manicGame.isJ2MECore {+ switch speed {+ case .one:+ j2meCore?.fastForward(speed: 1.0)+ case .two:+ j2meCore?.fastForward(speed: 1.5)+ case .three:+ j2meCore?.fastForward(speed: 3)+ case .four:+ j2meCore?.fastForward(speed: 5)+ case .five:+ j2meCore?.fastForward(speed: 7)+ }}}@@ -4236,6 +4422,14 @@ extension PlayViewController {}})}++ private func updateScreenScaling(_ scaling: GameSetting.ScreenScaling) {+ if manicGame.isLibretroType {+ LibretroCore.sharedInstance().setFullScreen(scaling == .stretch ? true : false)+ } else if manicGame.isJ2MECore {+ j2meCore?.setScaleMode(scaling)+ }+ }}//MARK: GameViewControllerDelegate代理@@ -4253,7 +4447,7 @@ extension PlayViewController: GameViewControllerDelegate {if SheetProvider.find(identifier: Constants.Strings.PlayPurchaseAlertIdentifier).count > 0 {return false}- return (GameSettingView.isShow || GameInfoView.isShow || CheatCodeListView.isShow || SkinSettingsView.isShow || ShadersListView.isShow || ControllersSettingView.isShow || GameSettingView.isEditingShow || WebViewController.isShow || FlexSkinSettingViewController.isShow || RetroAchievementsListViewController.isShow || CheevosPopupView.isShow || GameplayManualsView.isShow || FBNeoCheatCodeListView.isShow) ? false : true+ return (GameSettingView.isShow || GameInfoView.isShow || CheatCodeListView.isShow || SkinSettingsView.isShow || ShadersListView.isShow || ControllersSettingView.isShow || GameSettingView.isEditingShow || WebViewController.isShow || FlexSkinSettingViewController.isShow || RetroAchievementsListViewController.isShow || CheevosPopupView.isShow || GameplayManualsView.isShow || FBNeoCheatCodeListView.isShow || J2MESettingView.isShow) ? false : true}}@@ -4300,4 +4494,11 @@ extension PlayViewController {}return nil}++ static var j2meView: J2MEView? {+ if let currentPlayViewController {+ return currentPlayViewController.j2meCore+ }+ return nil+ }}diff --git a/ManicEmu/ManicEmu/Sources/Business/Play/Views/GameSettingView.swift b/ManicEmu/ManicEmu/Sources/Business/Play/Views/GameSettingView.swiftindex 4e2d3cd7..95b60df2 100644--- a/ManicEmu/ManicEmu/Sources/Business/Play/Views/GameSettingView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Play/Views/GameSettingView.swift@@ -225,6 +225,7 @@ class GameSettingView: BaseView {if let id = game.getExtraInt(key: ExtraKey.triggerProID.rawValue), id != -1 {triggerProId = id}+ let screenScaling = game.screenScalinggameSettings = settings.gameFunctionList.compactMap { itemTypeValue inif let itemType = GameSetting.ItemType(rawValue: itemTypeValue) {@@ -244,7 +245,8 @@ class GameSettingView: BaseView {airPlayScaling: airPlayScaling,airPlayLayout: airPlayLayout,nesPalette: nesPalettes,- triggerProID: triggerProId)+ triggerProID: triggerProId,+ screenScaling: screenScaling)}}return nil@@ -556,6 +558,8 @@ extension GameSettingView: UICollectionViewDelegate {returncase .triggerPro:item.triggerProID = Trigger.nextTriggerID(gameType: game.gameType, currentID: item.triggerProID)+ case .screenScaling:+ item.screenScaling = item.screenScaling.nextdefault:break}@@ -816,6 +820,16 @@ extension GameSettingView: UICollectionViewDelegate {menus.append(UIMenu(options: .displayInline, children: thirdGroup))}return UIContextMenuConfiguration(actionProvider: { _ in UIMenu(children: menus) } )+ } else if item.type == .screenScaling {+ let actions = GameSetting.ScreenScaling.allCases.map { scaling in+ UIAction(title: scaling.title,+ image: scaling == game.screenScaling ? UIImage(symbol: .checkmarkCircleFill) : nil) { [weak self] _ in+ guard let self = self else { return }+ item.screenScaling = scaling+ self.updateCellAndCallBack(item: item, indexPath: indexPath)+ }+ }+ return UIContextMenuConfiguration(actionProvider: { _ in UIMenu(children: actions) })}return nil}diff --git a/ManicEmu/ManicEmu/Sources/Business/Skin/Views/SkinSettingsView.swift b/ManicEmu/ManicEmu/Sources/Business/Skin/Views/SkinSettingsView.swiftindex 26ebc6ec..fa627c19 100644--- a/ManicEmu/ManicEmu/Sources/Business/Skin/Views/SkinSettingsView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/Skin/Views/SkinSettingsView.swift@@ -43,8 +43,8 @@ class SkinSettingsView: BaseView {} else {view.addTapGesture { [weak self] gesture inguard let self = self else { return }- let allGameTypes = System.allCases.filter({ $0 != .ns }).map { $0.gameType }- let itemTitles = System.allCases.filter({ $0 != .ns }).map { $0.gameType.localizedShortName }+ let allGameTypes = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType }+ let itemTitles = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType.localizedShortName }var items: [UIAction] = []let currentGameTypeName = self.gameType.localizedShortNamefor (index, title) in itemTitles.enumerated() {@@ -175,7 +175,7 @@ class SkinSettingsView: BaseView {///游戏类型private var gameType: GameType = {if let platformOrder = Constants.Config.PlatformOrder, let shortName = platformOrder.first, let type = GameType(shortName: shortName) {- if type == .ns {+ if type == .ns || type == .xbox360 {if platformOrder.count > 1, let type = GameType(shortName: platformOrder[1]) {return type} else {diff --git a/ManicEmu/ManicEmu/Sources/Business/TriggerPro/Views/TriggerProListView.swift b/ManicEmu/ManicEmu/Sources/Business/TriggerPro/Views/TriggerProListView.swiftindex a5765dfd..7966a07a 100644--- a/ManicEmu/ManicEmu/Sources/Business/TriggerPro/Views/TriggerProListView.swift+++ b/ManicEmu/ManicEmu/Sources/Business/TriggerPro/Views/TriggerProListView.swift@@ -20,7 +20,7 @@ class TriggerProListView: BaseView {}()private lazy var addButton: ContextMenuButton = {- let allGameTypes = System.allCases.filter({ $0 != .ns }).map { $0.gameType }+ let allGameTypes = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType }var actions: [UIMenuElement] = []for gameType in allGameTypes {actions.append(UIAction(title: gameType.localizedShortName) { [weak self] gesture in@@ -229,7 +229,7 @@ extension TriggerProListView: UITableViewDataSource, UITableViewDelegate {if let customPlatformOrder = Constants.Config.PlatformOrder {predefinedOrder = customPlatformOrder.compactMap { GameType(shortName: $0) }} else {- predefinedOrder = System.allCases.filter({ $0 != .ns }).map { $0.gameType }+ predefinedOrder = System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).map { $0.gameType }}let sortedKeys: [GameType] = predefinedOrder.filter { datas.keys.contains($0) }return sortedKeysdiff --git a/ManicEmu/ManicEmu/Sources/Tools/Cores/J2ME.swift b/ManicEmu/ManicEmu/Sources/Tools/Cores/J2ME.swiftnew file mode 100644index 00000000..4be45163--- /dev/null+++ b/ManicEmu/ManicEmu/Sources/Tools/Cores/J2ME.swift@@ -0,0 +1,185 @@+//+// J2ME.swift+// ManicEmu+//+// Created by Daiuno on 2026/3/2.+// Copyright © 2026 Manic EMU. All rights reserved.+//+import ManicEmuCore+import AVFoundation++extension GameType {+ static let j2me = GameType("public.aoshuang.game.j2me")+}++@objc enum J2MEGameInput: Int, Input, CaseIterable {+ case up+ case down+ case left+ case right+ case fire+ case num0+ case num1+ case num2+ case num3+ case num4+ case num5+ case num6+ case num7+ case num8+ case num9+ case star+ case pound+ case softkeyLeft+ case softkeyRight++ case flex+ case menu++ public var type: InputType {+ return .game(.j2me)+ }++ init?(stringValue: String) {+ if stringValue == "up" { self = .up }+ else if stringValue == "down" { self = .down }+ else if stringValue == "left" { self = .left }+ else if stringValue == "right" { self = .right }+ else if stringValue == "fire" { self = .fire }+ else if stringValue == "num0" { self = .num0 }+ else if stringValue == "num1" { self = .num1 }+ else if stringValue == "num2" { self = .num2 }+ else if stringValue == "num3" { self = .num3 }+ else if stringValue == "num4" { self = .num4 }+ else if stringValue == "num5" { self = .num5 }+ else if stringValue == "num6" { self = .num6 }+ else if stringValue == "num7" { self = .num7 }+ else if stringValue == "num8" { self = .num8 }+ else if stringValue == "num9" { self = .num9 }+ else if stringValue == "star" { self = .star }+ else if stringValue == "pound" { self = .pound }+ else if stringValue == "softkeyLeft" { self = .softkeyLeft }+ else if stringValue == "softkeyRight" { self = .softkeyRight }+ else if stringValue == "menu" { self = .menu }+ else if stringValue == "flex" { self = .flex }+ else { return nil }+ }+}++struct J2ME: ManicEmuCoreProtocol {+ public static let core = J2ME()++ public var name: String { "J2ME" }+ public var identifier: String { "com.aoshuang.J2MECore" }++ public var gameType: GameType { GameType.j2me }+ public var gameInputType: Input.Type { J2MEGameInput.self }+ var allInputs: [Input] { J2MEGameInput.allCases }+ public var gameSaveExtension: String { "srm" }++ // J2ME typically runs at variable frame rate+ public let audioFormat = AVAudioFormat(commonFormat: .pcmFormatInt16, sampleRate: 44100, channels: 2, interleaved: true)!+ public let videoFormat = VideoFormat(format: .bitmap(.rgba8), dimensions: J2MESize.defaultSize.cgSize)++ public var supportCheatFormats: Set<CheatFormat> {+ // J2ME doesn't support cheat codes+ return []+ }++ // J2ME uses WebView, so it doesn't need a traditional emulator connector+ public var emulatorConnector: EmulatorBase { J2MEEmulatorBridge.shared }++ private init()+ {+ }+}+++class J2MEEmulatorBridge: NSObject, EmulatorBase {+ static let shared = J2MEEmulatorBridge()++ var gameURL: URL?++ // J2ME frame rate varies by game+ private(set) var frameDuration: TimeInterval = (1.0 / 60.0)++ var audioRenderer: (any ManicEmuCore.AudioRenderProtocol)?+ var videoRenderer: (any ManicEmuCore.VideoRenderProtocol)?++ var saveUpdateHandler: (() -> Void)?++ func start(withGameURL gameURL: URL) {+ self.gameURL = gameURL+ }++ func stop() {}++ func pause() {}++ func resume() {}++ func runFrame(processVideo: Bool) {}++ func activateInput(_ input: Int, value: Double, playerIndex: Int) {+ guard playerIndex >= 0,+ let gameInput = J2MEGameInput(rawValue: input) else { return }++ if let button = convertToJ2MEButton(gameInput) {+ PlayViewController.j2meView?.pressButton(button, pressed: true)+ }++ }++ func deactivateInput(_ input: Int, playerIndex: Int) {+ guard playerIndex >= 0,+ let gameInput = J2MEGameInput(rawValue: input) else { return }++ if let button = convertToJ2MEButton(gameInput) {+ PlayViewController.j2meView?.pressButton(button, pressed: false)+ }+ }++ private func convertToJ2MEButton(_ input: J2MEGameInput) -> J2MEButton? {+ switch input {+ case .up: return .up+ case .down: return .down+ case .left: return .left+ case .right: return .right+ case .fire: return .fire+ case .num0: return .num0+ case .num1: return .num1+ case .num2: return .num2+ case .num3: return .num3+ case .num4: return .num4+ case .num5: return .num5+ case .num6: return .num6+ case .num7: return .num7+ case .num8: return .num8+ case .num9: return .num9+ case .star: return .star+ case .pound: return .pound+ case .softkeyLeft: return .softkeyLeft+ case .softkeyRight: return .softkeyRight+ default: return nil+ }+ }++ func resetInputs() {}++ func saveSaveState(to url: URL) {}++ func loadSaveState(from url: URL) {}++ func saveGameSave(to url: URL) {}++ func loadGameSave(from url: URL) {}++ func addCheatCode(_ cheatCode: String, type: String) -> Bool {+ // J2ME doesn't support cheat codes+ return false+ }++ func resetCheats() {}++ func updateCheats() {}+}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swiftindex 0f0ca000..d81ff7b5 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/GameTypeExtensions.swift@@ -96,6 +96,8 @@ extension GameType {self = .jaguar} else if ["lnx", "o"].contains(ext) {self = .lynx+ } else if ["jar"].contains(ext) {+ self = .j2me} else {self = .notSupport}@@ -168,7 +170,11 @@ extension GameType {self = .jaguar} else if shortName.uppercased() == "LYNX" {self = .lynx- } else {+ } else if shortName.uppercased() == "XBOX360" {+ self = .xbox360+ } else if shortName.uppercased() == "J2ME" {+ self = .j2me+ } else {return nil}}@@ -204,6 +210,8 @@ extension GameType {case .a7800: return "Atari 7800 ProSystem"case .jaguar: return "Atari Jaguar"case .lynx: return "Atari Lynx"+ case .j2me: return "Java ME"+ case .xbox360: return "Xbox 360"default: return ""}}@@ -239,6 +247,8 @@ extension GameType {case .a7800: return NSLocalizedString("7800", comment: "")case .jaguar: return NSLocalizedString("JAGUAR", comment: "")case .lynx: return NSLocalizedString("LYNX", comment: "")+ case .j2me: return NSLocalizedString("J2ME", comment: "")+ case .xbox360: return NSLocalizedString("XBOX360", comment: "")case .unknown: return R.string.localizable.unknownPlatform()default: return ""}@@ -275,6 +285,8 @@ extension GameType {case .a7800: return 1986case .lynx: return 1989case .jaguar: return 1993+ case .j2me: return 1999+ case .xbox360: return 2005default: return 0}}@@ -309,6 +321,7 @@ extension GameType {case .a7800: return A7800.corecase .jaguar: return Jaguar.corecase .lynx: return Lynx.core+ case .j2me: return J2ME.coredefault: return nil}}@@ -343,6 +356,8 @@ extension GameType {return [LibretroCore.Cores.PicoDrive.name, LibretroCore.Cores.JGenesis.name, LibretroCore.Cores.ClownMDEmu.name]} else if self == .ds {return [LibretroCore.Cores.melonDSDS.name, LibretroCore.Cores.DeSmuME.name]+ } else if self == .j2me {+ return [LibretroCore.Cores.J2meJS.name, LibretroCore.Cores.freej2me.name]}return []}@@ -399,6 +414,10 @@ extension GameType {return .arcadecase .a2600, .a5200, .a7800, .jaguar, .lynx:return .atari+ case .j2me:+ return .sun+ case .xbox360:+ return .microsoftdefault:return .nintendo}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/LibretroCoreExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/LibretroCoreExtensions.swiftindex b4395ba0..65c5541f 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/LibretroCoreExtensions.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/LibretroCoreExtensions.swift@@ -9,7 +9,7 @@extension LibretroCore {enum Cores {- case Nestopia, Snes9x, PicoDrive, Yabause, BeetleSaturn, Mupen64PlushNext, BeetleVB, PokeMini, BeetlePSXHW, bsnes, Gambatte, VBAM, mGBA, Flycast, Gearsystem, ClownMDEmu, bsnesJG, melonDSDS, PPSSPP, MAME, FinalBurnNeo, Citra, Azahar, JGenesis, DeSmuME, Stella, Atari800, ProSystem, VirtualJaguar, Holani+ case Nestopia, Snes9x, PicoDrive, Yabause, BeetleSaturn, Mupen64PlushNext, BeetleVB, PokeMini, BeetlePSXHW, bsnes, Gambatte, VBAM, mGBA, Flycast, Gearsystem, ClownMDEmu, bsnesJG, melonDSDS, PPSSPP, MAME, FinalBurnNeo, Citra, Azahar, JGenesis, DeSmuME, Stella, Atari800, ProSystem, VirtualJaguar, Holani, J2meJS, freej2mevar name: String {switch self {@@ -73,6 +73,10 @@ extension LibretroCore {"Virtual Jaguar"case .Holani:"Holani"+ case .J2meJS:+ "J2meJS"+ case .freej2me:+ "freej2me"}}}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIViewExtensions.swift b/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIViewExtensions.swiftindex b25e20c7..8ce99045 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIViewExtensions.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Extensions/UIViewExtensions.swift@@ -199,7 +199,7 @@ extension UIView {if forceHide {hideAction()} else {- //判断一下还有没有下载中的人物+ //判断一下还有没有下载中的任务if !DownloadManager.shared.hasDownloadTask && !SyncManager.shared.hasDownloadTask {hideAction()}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/CoreSelectionView.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/CoreSelectionView.swiftindex f6c0e6f7..8ebda6bf 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/CoreSelectionView.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/CoreSelectionView.swift@@ -102,9 +102,9 @@ class CoreSelectionView: BaseView {Game.change { realm ingame.defaultCore = coreIndex}- //处理SS的存档+ //SS J2me的存档不切换let newSaveUrl = game.gameSaveUrl- if game.gameType != .ss, FileManager.default.fileExists(atPath: oldSaveUrl.path) {+ if game.gameType != .ss, game.gameType != .j2me, FileManager.default.fileExists(atPath: oldSaveUrl.path) {try? FileManager.safeMoveItem(at: oldSaveUrl, to: newSaveUrl)}//处理DS的存档diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swiftindex 5175b6d0..007fe86e 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/Database.swift@@ -48,7 +48,7 @@ struct Database {//设置已经存在,检查一下皮肤数量是否和模拟器数量一致,不一致的话 需要更新默认皮肤let defaultSkins = realm.objects(Skin.self).where { $0.skinType == .default }let defaultSkinsCount = defaultSkins.count- if defaultSkinsCount != System.allCases.filter({ $0 != .ns }).count {+ if defaultSkinsCount != System.allCases.filter({ $0 != .ns && $0 != .xbox360 }).count {Log.debug("更新设置 新增皮肤")//默认皮肤数量不正确 可能新增了核心 需要重置皮肤try? realm.write {diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/EmulatorInteractionKit.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulatorInteractionKit.swiftnew file mode 100644index 00000000..0bd76982--- /dev/null+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/EmulatorInteractionKit.swift@@ -0,0 +1,152 @@+//+// EmulatorInteractionKit.swift+// ManicEmu+//+// Created by Daiuno on 2025/12/16.+// Copyright © 2025 Manic EMU. All rights reserved.+//++import ManicEmuCore+import IceCream++extension GameType {+ static let ns = GameType("public.aoshuang.game.ns")+ static let xbox360 = GameType("public.aoshuang.game.xbox360")+}++struct EmulatorInteractionKit {+ enum EmulatorType {+ case meloNX, xeniOS+ }++ static func isInstalled(type: EmulatorType) -> Bool {+ switch type {+ case .meloNX:+ return UIApplication.shared.canOpenURL(Constants.URLs.FetchMeloNXGames)+ case .xeniOS:+ return UIApplication.shared.canOpenURL(Constants.URLs.FetchXeniOSGames)+ }+ }++ static func startGame(type: EmulatorType, id: String) {+ if isInstalled(type: type) {+ switch type {+ case .meloNX:+ UIApplication.shared.open(Constants.URLs.MeloNXGameLaunch(gameId: id))+ case .xeniOS:+ UIApplication.shared.open(Constants.URLs.XeniOSGameLaunch(gameId: id))+ }+ } else {+ DispatchQueue.main.asyncAfter(delay: 0.35) {+ switch type {+ case .meloNX:+ UIView.makeToast(message: R.string.localizable.notInstallMeloNX())+ case .xeniOS:+ UIView.makeToast(message: R.string.localizable.notInstall("XeniOS"))+ }+ }+ }+ }++ static func fetchGames(type: EmulatorType) {+ if isInstalled(type: type) {+ switch type {+ case .meloNX:+ UIApplication.shared.open(Constants.URLs.FetchMeloNXGames)+ case .xeniOS:+ UIApplication.shared.open(Constants.URLs.FetchXeniOSGames)+ }++ } else {+ switch type {+ case .meloNX:+ UIView.makeToast(message: R.string.localizable.notInstallMeloNX())+ case .xeniOS:+ UIView.makeToast(message: R.string.localizable.notInstall("XeniOS"))+ }+ }+ }++ static func processGames(type: EmulatorType, callbackUrl: URL) {+ var delay: Double+ if let _ = ApplicationSceneDelegate.applicationWindow {+ delay = 0.0+ } else {+ delay = 3.0+ }+ DispatchQueue.global().asyncAfter(delay: delay) {+ let fromGames = GameScheme.pullFromURL(callbackUrl)+ var games = [Game]()+ let realm = Database.realm+ for mg in fromGames {+ if let _ = realm.object(ofType: Game.self, forPrimaryKey: mg.titleId) {+ Log.debug("MeloNX游戏已存在:\(mg.titleId) \(mg.titleName)")+ } else {+ let game = Game()+ switch type {+ case .meloNX:+ game.fileExtension = "xci"+ game.gameType = .ns+ case .xeniOS:+ game.fileExtension = "iso"+ game.gameType = .xbox360+ }+ game.id = mg.titleId+ game.name = mg.titleName+ game.importDate = Date()+ if let icon = mg.iconData {+ game.gameCover = CreamAsset.create(objectID: game.id, propName: "gameCover", data: icon)+ } else {++ }+ games.append(game)+ }+ }+ if games.count > 0 {+ try? realm.write({+ realm.add(games)+ })+ DispatchQueue.main.asyncAfter(delay: 1) {+ switch type {+ case .meloNX:+ UIView.makeToast(message: R.string.localizable.biosImportSuccess("MeloNX Games"))+ case .xeniOS:+ UIView.makeToast(message: R.string.localizable.biosImportSuccess("Xenios Games"))+ }+ }+ }+ }+ }+}++struct GameScheme: Codable, Identifiable, Equatable, Hashable, Sendable {+ var id = UUID().uuidString++ var titleName: String+ var titleId: String+ var developer: String+ var version: String+ var iconData: Data?++ static func pullFromURL(_ url: URL) -> [GameScheme] {+ if let components = URLComponents(url: url, resolvingAgainstBaseURL: true) {+ if let text = components.queryItems?.first(where: { $0.name == "games" })?.value, let data = GameScheme.base64URLDecode(text) {++ if let decoded = try? JSONDecoder().decode([GameScheme].self, from: data) {+ return decoded+ }+ }+ }+ return []+ }++ private static func base64URLDecode(_ text: String) -> Data? {+ var base64 = text+ base64 = base64.replacingOccurrences(of: "-", with: "+")+ base64 = base64.replacingOccurrences(of: "_", with: "/")+ while base64.count % 4 != 0 {+ base64 = base64.appending("=")+ }+ return Data(base64Encoded: base64)+ }+}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swiftindex 27093ab5..6154d53d 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/FilesImporter.swift@@ -495,6 +495,15 @@ extension FilesImporter {game.defaultCore = 1}#endif++ var j2MEManifest: J2MEManifest? = nil+ if game.gameType == .j2me {+ j2MEManifest = J2MEManifest.read(from: url.path)+ if let j2MEManifest {+ game.aliasName = j2MEManifest.displayName+ }+ }+do {if ciaTitleUrl == nil {//cia格式的3DS不需要拷贝了 因为已经安装进游戏目录了@@ -522,6 +531,11 @@ extension FilesImporter {game.updateExtra(key: ExtraKey.PSPGameCode.rawValue, value: gameCode)}+ //获取j2me的ScreenSize+ if gameType == .j2me, let j2MEManifest {+ game.updateExtra(key: ExtraKey.j2meScreenSize.rawValue, value: j2MEManifest.screenSize.stringValue)+ }+return} catch {//写入数据失败diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/LocalWebServer.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/LocalWebServer.swiftindex 2652964a..fcbdaa16 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/LocalWebServer.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/LocalWebServer.swift@@ -9,7 +9,7 @@ import GCDWebServerclass LocalWebServer {enum ServerType {- case JGenesis, RomPatcher, J2meJS, freej2me+ case JGenesis, RomPatcher, J2meJS, freej2meWeb}private var server: GCDWebServer?@@ -87,9 +87,73 @@ class LocalWebServer {cacheAge: 0,allowRangeRequests: true)case .J2meJS:- break- case .freej2me:- break+ resourcePath = Constants.Path.J2meJS++ // Add generic directory handler+ server?.addGETHandler(forBasePath: "/",+ directoryPath: resourcePath,+ indexFilename: nil,+ cacheAge: 0,+ allowRangeRequests: true)++ // JAR file handler for game loading+ server?.addHandler(forMethod: "GET", pathRegex: "/file/.*", request: GCDWebServerRequest.self) { [weak self] request in+ guard let self else { return nil }+ let fileId = request.path.lastPathComponent+ guard let filePath = self.files[fileId] else {+ return GCDWebServerResponse(statusCode: 404)+ }++ guard FileManager.default.fileExists(atPath: filePath) else {+ return GCDWebServerResponse(statusCode: 404)+ }++ let response = GCDWebServerFileResponse(file: filePath)+ response?.cacheControlMaxAge = 0+ response?.setValue("no-cache, no-store, must-revalidate", forAdditionalHeader: "Cache-Control")+ response?.contentType = "application/java-archive"+ return response+ }++ case .freej2meWeb:+ resourcePath = Constants.Path.Freej2meWeb++ // Add generic directory handler+ server?.addGETHandler(forBasePath: "/",+ directoryPath: resourcePath,+ indexFilename: nil,+ cacheAge: 3600,+ allowRangeRequests: true)++ // WASM file handler with correct MIME type+ server?.addHandler(forMethod: "GET", pathRegex: "/.*\\.wasm", request: GCDWebServerRequest.self) { request in+ let wasmPath = resourcePath.appendingPathComponent(request.path)+ guard FileManager.default.fileExists(atPath: wasmPath) else {+ return GCDWebServerResponse(statusCode: 404)+ }+ let response = GCDWebServerFileResponse(file: wasmPath)+ response?.contentType = "application/wasm"+ return response+ }++ // JAR file handler for game loading+ server?.addHandler(forMethod: "GET", pathRegex: "/file/.*", request: GCDWebServerRequest.self) { [weak self] request in+ guard let self else { return nil }+ let fileId = request.path.lastPathComponent+ guard let filePath = self.files[fileId] else {+ return GCDWebServerResponse(statusCode: 404)+ }++ guard FileManager.default.fileExists(atPath: filePath) else {+ return GCDWebServerResponse(statusCode: 404)+ }++ let response = GCDWebServerFileResponse(file: filePath)+ response?.cacheControlMaxAge = 0+ response?.setValue("no-cache, no-store, must-revalidate", forAdditionalHeader: "Cache-Control")+ response?.contentType = "application/java-archive"+ return response+ }}try server?.start(options: [diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/MeloNXKit.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/MeloNXKit.swiftdeleted file mode 100644index 83c9aace..00000000--- a/ManicEmu/ManicEmu/Sources/Tools/Others/MeloNXKit.swift+++ /dev/null@@ -1,113 +0,0 @@-//-// MeloNXKit.swift-// ManicEmu-//-// Created by Daiuno on 2025/12/16.-// Copyright © 2025 Manic EMU. All rights reserved.-//--import ManicEmuCore-import IceCream--extension GameType {- static let ns = GameType("public.aoshuang.game.ns")-}--struct MeloNXKit {- static var isInstalled: Bool {- return UIApplication.shared.canOpenURL(Constants.URLs.FetchMeloNXGames)- }-- static func startGame(id: String) {- if isInstalled {- UIApplication.shared.open(Constants.URLs.MeloNXGameLaunch(gameId: id))- } else {- DispatchQueue.main.asyncAfter(delay: 0.35) {- UIView.makeToast(message: R.string.localizable.notInstallMeloNX())- }- }- }-- static func fetchGames() {- if isInstalled {- UIApplication.shared.open(Constants.URLs.FetchMeloNXGames)- } else {- DispatchQueue.main.asyncAfter(delay: 0.35) {- UIView.makeToast(message: R.string.localizable.notInstallMeloNX())- }- }- }-- static func processGames(callbackUrl: URL) {- var delay: Double- if let _ = ApplicationSceneDelegate.applicationWindow {- delay = 0.0- } else {- delay = 3.0- }- DispatchQueue.global().asyncAfter(delay: delay) {- let meloNXGames = GameScheme.pullFromURL(callbackUrl)- var games = [Game]()- let realm = Database.realm- for mg in meloNXGames {- if let _ = realm.object(ofType: Game.self, forPrimaryKey: mg.titleId) {- Log.debug("MeloNX游戏已存在:\(mg.titleId) \(mg.titleName)")- } else {- let game = Game()- game.id = mg.titleId- game.name = mg.titleName- game.fileExtension = "xci"- game.gameType = .ns- game.importDate = Date()- game.hasCoverMatch = true- if let icon = mg.iconData {- game.gameCover = CreamAsset.create(objectID: game.id, propName: "gameCover", data: icon)- }- games.append(game)- }- }- if games.count > 0 {- try? realm.write({- realm.add(games)- })- DispatchQueue.main.asyncAfter(delay: 0.35) {- UIView.makeToast(message: R.string.localizable.biosImportSuccess("MeloNX Games"))- }- }- }- }-}--struct GameScheme: Codable, Identifiable, Equatable, Hashable, Sendable {- var id = UUID().uuidString-- var titleName: String- var titleId: String- var developer: String- var version: String- var iconData: Data?-- static func pullFromURL(_ url: URL) -> [GameScheme] {- if let components = URLComponents(url: url, resolvingAgainstBaseURL: true) {- if components.host == Constants.Strings.MeloNXScheme {- if let text = components.queryItems?.first(where: { $0.name == "games" })?.value, let data = GameScheme.base64URLDecode(text) {-- if let decoded = try? JSONDecoder().decode([GameScheme].self, from: data) {- return decoded- }- }- }- }- return []- }-- private static func base64URLDecode(_ text: String) -> Data? {- var base64 = text- base64 = base64.replacingOccurrences(of: "-", with: "+")- base64 = base64.replacingOccurrences(of: "_", with: "/")- while base64.count % 4 != 0 {- base64 = base64.appending("=")- }- return Data(base64Encoded: base64)- }-}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/MobyGamesKit.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/MobyGamesKit.swiftindex 07c0e04b..26ceca57 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/MobyGamesKit.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/MobyGamesKit.swift@@ -17,9 +17,9 @@ struct MobyGamesKit {var url: String}- static func getGameInfoUrl(game: Game, completion: ((URL)->Void)? = nil) {- let gameTypeName = game.gameType == .fds ? GameType.nes.localizedShortName : game.gameType.localizedShortName- let searchPattern = game.translatedName ?? game.aliasName ?? game.name+ static func getGameInfoUrl(gameType: GameType, name: String, completion: ((URL)->Void)? = nil) {+ let gameTypeName = gameType == .fds ? GameType.nes.localizedShortName : gameType.localizedShortName+ let searchPattern = nameDispatchQueue.global().async {do {let db = try Connection(Constants.Path.GamesDB)@@ -72,4 +72,8 @@ struct MobyGamesKit {}}}++ static func getGameInfoUrl(game: Game, completion: ((URL)->Void)? = nil) {+ self.getGameInfoUrl(gameType: game.gameType, name: game.translatedName ?? game.aliasName ?? game.name, completion: completion)+ }}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swiftindex 0d083941..b36b96d1 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/OnlineCoverManager.swift@@ -22,7 +22,7 @@ class OnlineCoverManager {init(game: Game) {self.gameType = game.gameTypeself.gameID = game.id- self.gameName = game.aliasName ?? game.name+ self.gameName = game.translatedName ?? game.aliasName ?? game.nameself.fileExtension = game.fileExtension}@@ -45,12 +45,12 @@ class OnlineCoverManager {guard !isCancelled else { return }let semaphore = DispatchSemaphore(value: 0)- MatchOperation.searchCovers(coverMatch: coverMatch, fetchOne: true) { [weak self] urls, requestFailed in+ MatchOperation.searchCovers(coverMatch: coverMatch, fetchOne: true) { [weak self] urls, needMatchNextTime inguard let self = self else {semaphore.signal()return}- guard !requestFailed else {+ guard !needMatchNextTime else {semaphore.signal()return}@@ -127,6 +127,12 @@ class OnlineCoverManager {boxArtUrl = host.appendingPathComponent("Atari - Jaguar/Named_Boxarts")case .lynx:boxArtUrl = host.appendingPathComponent("Atari - Lynx/Named_Boxarts")+ case .ns, .xbox360, .j2me:+ searchCoversFromMoby(coverMatch: coverMatch,+ persistentedTranslation: persistentedTranslation,+ isCallBackMain: isCallBackMain,+ completion: completion)+ returndefault:boxArtUrl = nil}@@ -195,6 +201,55 @@ class OnlineCoverManager {}}+ static func searchCoversFromMoby(coverMatch: CoverMatch, persistentedTranslation: Bool = true, isCallBackMain: Bool = false, completion: (([URL], Bool)->Void)? = nil) {+ translateGameName(coverMatch.gameName,+ gameID: persistentedTranslation ? coverMatch.gameID : nil) { translatedName in+ MobyGamesKit.getGameInfoUrl(gameType: coverMatch.gameType, name: translatedName) { url in+ func callback(urls: [URL], needMatchNextTime: Bool) {+ if isCallBackMain {+ DispatchQueue.main.async {+ completion?(urls, needMatchNextTime)+ }+ } else {+ completion?(urls, needMatchNextTime)+ }+ }++ if url == Constants.URLs.MobyGames {+ callback(urls: [], needMatchNextTime: false)+ } else {+ //获取到结果+ URLSession.shared.dataTask(with: url) { data, response, error in+ if let data = data,+ let html = String(data: data, encoding: .utf8),+ let document = try? SwiftSoup.parse(html) {+ let links = try? document.select("img.img-box").filter({ element in+ if element.hasAttr("src"), let alt = try? element.attr("alt"), alt == "box cover" {+ return true+ }+ return false+ }).compactMap({+ if let src = try? $0.attr("src") {+ return URL(string: src.removingPercentEncoding)+ }+ return nil+ })+ if let links {+ callback(urls: links, needMatchNextTime: false)+ } else {+ callback(urls: [], needMatchNextTime: false)+ }++ } else {+ callback(urls: [], needMatchNextTime: true)+ }+ }.resume()++ }+ }+ }+ }+private static func getMatchList(url: URL, completion: @escaping ([String])->Void) {let matchListPath = Constants.Path.BoxArtsCache.appendingPathComponent("\(Insecure.MD5.hash(data: Data(url.absoluteString.utf8)).map { String(format: "%02x", $0) }.joined())")try? FileManager.default.createDirectory(atPath: Constants.Path.BoxArtsCache, withIntermediateDirectories: true)diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/System.swiftindex 84d9e96f..9aee2303 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/System.swift@@ -11,6 +11,8 @@ import ManicEmuCoreenum System: CaseIterable{+ case j2me+ case xbox360case jaguarcase lynxcase a7800@@ -46,7 +48,7 @@ enum System: CaseIterable}static var allCores: [ManicEmuCoreProtocol] {- return [NES.core, SNES.core, ThreeDS.core, GBC.core, GBA.core, PSP.core, MD.core, MCD.core, S2X.core, SG1000.core, GG.core, MS.core, SS.core, N64.core, GB.core, VB.core, PM.core, PS1.core, DC.core, DS.core, FDS.core, Arcade.core, A2600.core, A5200.core, A7800.core, Lynx.core, Jaguar.core]+ return [NES.core, SNES.core, ThreeDS.core, GBC.core, GBA.core, PSP.core, MD.core, MCD.core, S2X.core, SG1000.core, GG.core, MS.core, SS.core, N64.core, GB.core, VB.core, PM.core, PS1.core, DC.core, DS.core, FDS.core, Arcade.core, A2600.core, A5200.core, A7800.core, Lynx.core, Jaguar.core, J2ME.core]}}@@ -83,6 +85,8 @@ extension System {case .a7800: return .a7800case .jaguar: return .jaguarcase .lynx: return .lynx+ case .j2me: return .j2me+ case .xbox360: return .xbox360}}}diff --git a/ManicEmu/ManicEmu/Sources/Tools/Others/WeakScriptMessageHandler.swift b/ManicEmu/ManicEmu/Sources/Tools/Others/WeakScriptMessageHandler.swiftindex aa0044c2..ae14a491 100644--- a/ManicEmu/ManicEmu/Sources/Tools/Others/WeakScriptMessageHandler.swift+++ b/ManicEmu/ManicEmu/Sources/Tools/Others/WeakScriptMessageHandler.swift@@ -6,6 +6,8 @@// Copyright © 2026 Manic EMU. All rights reserved.//+import WebKit+final class WeakScriptMessageHandler: NSObject, WKScriptMessageHandler {weak var target: WKScriptMessageHandler?diff --git a/ManicSupport/Resources/System.core b/ManicSupport/Resources/System.coreindex fc240995..13ae1eff 100644--- a/ManicSupport/Resources/System.core+++ b/ManicSupport/Resources/System.core@@ -1,3 +1,3 @@version https://git-lfs.github.com/spec/v1-oid sha256:4632ff0f1ff2c8693357bea096dd964abf4e90626c16952cf55479001b7ac013-size 59303666+oid sha256:8076af9631d2d260e72ca801e686c7e91336b065847d3166ed7f5c1d27968c89+size 71841118