diff --git a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj index f95210535..018cfb3c3 100644 --- a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj +++ b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj @@ -67,6 +67,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 4E7023A52D5A98E2002C7183 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 4E80A98D2CD6F54500029585 /* MeloNX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MeloNX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4E80A99D2CD6F54700029585 /* MeloNXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeloNXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4E80A9A72CD6F54700029585 /* MeloNXUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeloNXUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -96,7 +97,7 @@ "Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib" = ( CodeSignOnCopy, ); - "Dependencies/Dynamic Libraries/SoftwareKeyboard.framework" = ( + "Dependencies/Dynamic Libraries/RyujinxKeyboard.framework" = ( CodeSignOnCopy, RemoveHeadersOnCopy, ); @@ -157,7 +158,7 @@ "Dependencies/Dynamic Libraries/libavutil.dylib", "Dependencies/Dynamic Libraries/libMoltenVK.dylib", "Dependencies/Dynamic Libraries/Ryujinx.Headless.SDL2.dylib", - "Dependencies/Dynamic Libraries/SoftwareKeyboard.framework", + "Dependencies/Dynamic Libraries/RyujinxKeyboard.framework", Dependencies/XCFrameworks/libavcodec.xcframework, Dependencies/XCFrameworks/libavfilter.xcframework, Dependencies/XCFrameworks/libavformat.xcframework, @@ -232,6 +233,7 @@ 4E80AA192CD700F500029585 /* Frameworks */ = { isa = PBXGroup; children = ( + 4E7023A52D5A98E2002C7183 /* UIKit.framework */, 4E80AA622CD7122800029585 /* GameController.framework */, ); name = Frameworks; @@ -634,6 +636,10 @@ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", ); GCC_OPTIMIZATION_LEVEL = fast; GENERATE_INFOPLIST_FILE = YES; @@ -677,6 +683,10 @@ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", ); MARKETING_VERSION = 0.0.8; PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX; @@ -713,6 +723,10 @@ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", ); GCC_OPTIMIZATION_LEVEL = fast; GENERATE_INFOPLIST_FILE = YES; @@ -756,6 +770,10 @@ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", + "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries", ); MARKETING_VERSION = 0.0.8; PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX; diff --git a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate index f83b83b56..4a700b060 100644 Binary files a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate and b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/MeloNX/MeloNX.xcodeproj/xcuserdata/stossy11.xcuserdatad/xcschemes/xcschememanagement.plist b/src/MeloNX/MeloNX.xcodeproj/xcuserdata/stossy11.xcuserdatad/xcschemes/xcschememanagement.plist index 8ff6cf524..62375ba69 100644 --- a/src/MeloNX/MeloNX.xcodeproj/xcuserdata/stossy11.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/src/MeloNX/MeloNX.xcodeproj/xcuserdata/stossy11.xcuserdatad/xcschemes/xcschememanagement.plist @@ -12,12 +12,12 @@ Ryujinx.xcscheme_^#shared#^_ orderHint - 2 + 1 com.Stossy11.MeloNX.RyujinxAg.xcscheme_^#shared#^_ orderHint - 1 + 2 SuppressBuildableAutocreation diff --git a/src/MeloNX/MeloNX/App/Core/Headers/Ryujinx-Header.h b/src/MeloNX/MeloNX/App/Core/Headers/Ryujinx-Header.h index fd1ed568d..d7f16215b 100644 --- a/src/MeloNX/MeloNX/App/Core/Headers/Ryujinx-Header.h +++ b/src/MeloNX/MeloNX/App/Core/Headers/Ryujinx-Header.h @@ -5,7 +5,7 @@ // Created by Stossy11 on 3/11/2024. // -#define DRM 1 +#define DRM 0 #define CS_DEBUGGED 0x10000000 #ifndef RyujinxHeader diff --git a/src/MeloNX/MeloNX/App/Views/ContentView.swift b/src/MeloNX/MeloNX/App/Views/ContentView.swift index 9d2129ada..7ae91f806 100644 --- a/src/MeloNX/MeloNX/App/Views/ContentView.swift +++ b/src/MeloNX/MeloNX/App/Views/ContentView.swift @@ -61,8 +61,8 @@ struct ContentView: View { // Metal Private API isn't needed and causes more stutters MoltenVKSettings(string: "MVK_USE_METAL_PRIVATE_API", value: "1"), MoltenVKSettings(string: "MVK_CONFIG_USE_METAL_PRIVATE_API", value: "1"), - MoltenVKSettings(string: "MVK_DEBUG", value: "1"), - MoltenVKSettings(string: "MVK_CONFIG_LOG_LEVEL", value: "2"), + MoltenVKSettings(string: "MVK_DEBUG", value: "0"), + // MoltenVKSettings(string: "MVK_CONFIG_LOG_LEVEL", value: "0"), // MVK_CONFIG_LOG_LEVEL //MVK_DEBUG // Uses more ram but makes performance higher, may add an option in settings to change or enable / disable this value (default 64 or 192 depending on what i decide) @@ -116,6 +116,8 @@ struct ContentView: View { .onAppear() { quits = false + + initControllerObservers() // This initializes the Controller Observers that refreshes the controller list when a new controller connecvts. } .onOpenURL() { url in diff --git a/src/MeloNX/MeloNX/App/Views/GamesList/GameListView.swift b/src/MeloNX/MeloNX/App/Views/GamesList/GameListView.swift index 9d22ae22a..c5547181f 100644 --- a/src/MeloNX/MeloNX/App/Views/GamesList/GameListView.swift +++ b/src/MeloNX/MeloNX/App/Views/GamesList/GameListView.swift @@ -195,7 +195,11 @@ struct GameLibraryView: View { Button { let documentsUrl = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! - let sharedurl = documentsUrl.absoluteString.replacingOccurrences(of: "file://", with: "shareddocuments://") + var sharedurl = documentsUrl.absoluteString.replacingOccurrences(of: "file://", with: "shareddocuments://") + if ProcessInfo.processInfo.isiOSAppOnMac { + sharedurl = documentsUrl.absoluteString + } + print(sharedurl) let furl = URL(string: sharedurl)! if UIApplication.shared.canOpenURL(furl) { UIApplication.shared.open(furl, options: [:]) diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Headers/RyujinxKeyboard.h b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Headers/RyujinxKeyboard.h new file mode 100644 index 000000000..1ef86b42e --- /dev/null +++ b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Headers/RyujinxKeyboard.h @@ -0,0 +1,18 @@ +// +// RyujinxKeyboard.h +// RyujinxKeyboard +// +// Created by Stossy11 on 11/02/2025. +// + +#import + +//! Project version number for RyujinxKeyboard. +FOUNDATION_EXPORT double RyujinxKeyboardVersionNumber; + +//! Project version string for RyujinxKeyboard. +FOUNDATION_EXPORT const unsigned char RyujinxKeyboardVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Info.plist b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Info.plist similarity index 52% rename from src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Info.plist rename to src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Info.plist index 299dc69cf..ead4b1203 100644 Binary files a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Info.plist and b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Info.plist differ diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Modules/module.modulemap b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Modules/module.modulemap new file mode 100644 index 000000000..a85f1c291 --- /dev/null +++ b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module RyujinxKeyboard { + umbrella header "RyujinxKeyboard.h" + export * + + module * { export * } +} diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/RyujinxKeyboard b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/RyujinxKeyboard new file mode 100755 index 000000000..e53f922fe Binary files /dev/null and b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/RyujinxKeyboard differ diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/_CodeSignature/CodeResources b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/_CodeSignature/CodeResources new file mode 100644 index 000000000..02359dbd6 --- /dev/null +++ b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/RyujinxKeyboard.framework/_CodeSignature/CodeResources @@ -0,0 +1,124 @@ + + + + + files + + Headers/RyujinxKeyboard.h + + 5P7GN4g050n199pV6/+SpfMBgJc= + + Info.plist + + hYdI/ktAKwjBSfaJpt6Yc8UKLCY= + + Modules/module.modulemap + + 0kFAMoTn+4Q1J/dM6uMLe3EhbL0= + + + files2 + + Headers/RyujinxKeyboard.h + + hash2 + + /yGmHq9NdBF/ruesISIj7vml0ySgoJkrFOcrw0vaIxQ= + + + Modules/module.modulemap + + hash2 + + K+ZyxKhTI4bMVZuHBIspvd2PFqvCOlVUFYmwF96O5NQ= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Headers/SoftwareKeyboard.h b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Headers/SoftwareKeyboard.h deleted file mode 100644 index b8bdf03bf..000000000 --- a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Headers/SoftwareKeyboard.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// SoftwareKeyboard.h -// SoftwareKeyboard -// -// Created by Stossy11 on 19/12/2024. -// - -#import - -//! Project version number for SoftwareKeyboard. -FOUNDATION_EXPORT double SoftwareKeyboardVersionNumber; - -//! Project version string for SoftwareKeyboard. -FOUNDATION_EXPORT const unsigned char SoftwareKeyboardVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo deleted file mode 100644 index 1c0dfcf41..000000000 Binary files a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and /dev/null differ diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.abi.json b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.abi.json deleted file mode 100644 index 002127503..000000000 --- a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.abi.json +++ /dev/null @@ -1,1454 +0,0 @@ -{ - "ABIRoot": { - "kind": "Root", - "name": "SoftwareKeyboard", - "printedName": "SoftwareKeyboard", - "children": [ - { - "kind": "Import", - "name": "UIKit", - "printedName": "UIKit", - "declKind": "Import", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment" - ] - }, - { - "kind": "TypeDecl", - "name": "KeyboardMode", - "printedName": "KeyboardMode", - "children": [ - { - "kind": "Var", - "name": "default", - "printedName": "default", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeDefault", - "mangledName": "$s16SoftwareKeyboard0B4ModeO7defaultyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "ObjC" - ], - "fixedbinaryorder": 0 - }, - { - "kind": "Var", - "name": "numeric", - "printedName": "numeric", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeNumeric", - "mangledName": "$s16SoftwareKeyboard0B4ModeO7numericyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 1 - }, - { - "kind": "Var", - "name": "ascii", - "printedName": "ascii", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeAscii", - "mangledName": "$s16SoftwareKeyboard0B4ModeO5asciiyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 2 - }, - { - "kind": "Var", - "name": "fullLatin", - "printedName": "fullLatin", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeFullLatin", - "mangledName": "$s16SoftwareKeyboard0B4ModeO9fullLatinyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 3 - }, - { - "kind": "Var", - "name": "alphabet", - "printedName": "alphabet", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeAlphabet", - "mangledName": "$s16SoftwareKeyboard0B4ModeO8alphabetyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 4 - }, - { - "kind": "Var", - "name": "simplifiedChinese", - "printedName": "simplifiedChinese", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeSimplifiedChinese", - "mangledName": "$s16SoftwareKeyboard0B4ModeO17simplifiedChineseyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 5 - }, - { - "kind": "Var", - "name": "traditionalChinese", - "printedName": "traditionalChinese", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeTraditionalChinese", - "mangledName": "$s16SoftwareKeyboard0B4ModeO18traditionalChineseyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 6 - }, - { - "kind": "Var", - "name": "korean", - "printedName": "korean", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeKorean", - "mangledName": "$s16SoftwareKeyboard0B4ModeO6koreanyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 7 - }, - { - "kind": "Var", - "name": "languageSet2", - "printedName": "languageSet2", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeLanguageSet2", - "mangledName": "$s16SoftwareKeyboard0B4ModeO12languageSet2yA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 8 - }, - { - "kind": "Var", - "name": "languageSet2Latin", - "printedName": "languageSet2Latin", - "children": [ - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(SoftwareKeyboard.KeyboardMode.Type) -> SoftwareKeyboard.KeyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "Metatype", - "printedName": "SoftwareKeyboard.KeyboardMode.Type", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ] - } - ] - } - ], - "declKind": "EnumElement", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode@KeyboardModeLanguageSet2Latin", - "mangledName": "$s16SoftwareKeyboard0B4ModeO17languageSet2LatinyA2CmF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "RawDocComment", - "ObjC" - ], - "fixedbinaryorder": 9 - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(rawValue:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "SoftwareKeyboard.KeyboardMode?", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "UInt32", - "printedName": "Swift.UInt32", - "usr": "s:s6UInt32V" - } - ], - "declKind": "Constructor", - "usr": "s:16SoftwareKeyboard0B4ModeO8rawValueACSgs6UInt32V_tcfc", - "mangledName": "$s16SoftwareKeyboard0B4ModeO8rawValueACSgs6UInt32V_tcfc", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "init_kind": "Designated" - }, - { - "kind": "Var", - "name": "rawValue", - "printedName": "rawValue", - "children": [ - { - "kind": "TypeNominal", - "name": "UInt32", - "printedName": "Swift.UInt32", - "usr": "s:s6UInt32V" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0B4ModeO8rawValues6UInt32Vvp", - "mangledName": "$s16SoftwareKeyboard0B4ModeO8rawValues6UInt32Vvp", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "UInt32", - "printedName": "Swift.UInt32", - "usr": "s:s6UInt32V" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0B4ModeO8rawValues6UInt32Vvg", - "mangledName": "$s16SoftwareKeyboard0B4ModeO8rawValues6UInt32Vvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - } - ] - } - ], - "declKind": "Enum", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode", - "mangledName": "$s16SoftwareKeyboard0B4ModeO", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "AccessControl", - "ObjC", - "RawDocComment" - ], - "enumRawTypeName": "UInt32", - "conformances": [ - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - }, - { - "kind": "Conformance", - "name": "Equatable", - "printedName": "Equatable", - "usr": "s:SQ", - "mangledName": "$sSQ" - }, - { - "kind": "Conformance", - "name": "Hashable", - "printedName": "Hashable", - "usr": "s:SH", - "mangledName": "$sSH" - }, - { - "kind": "Conformance", - "name": "RawRepresentable", - "printedName": "RawRepresentable", - "children": [ - { - "kind": "TypeWitness", - "name": "RawValue", - "printedName": "RawValue", - "children": [ - { - "kind": "TypeNominal", - "name": "UInt32", - "printedName": "Swift.UInt32", - "usr": "s:s6UInt32V" - } - ] - } - ], - "usr": "s:SY", - "mangledName": "$sSY" - } - ] - }, - { - "kind": "TypeDecl", - "name": "SoftwareKeyboardUiArgs", - "printedName": "SoftwareKeyboardUiArgs", - "children": [ - { - "kind": "Var", - "name": "keyboardMode", - "printedName": "keyboardMode", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0Ovs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0OvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12keyboardModeAA0bF0OvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "headerText", - "printedName": "headerText", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10headerTextSSvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10headerTextSSvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10headerTextSSvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10headerTextSSvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10headerTextSSvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10headerTextSSvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10headerTextSSvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10headerTextSSvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "subtitleText", - "printedName": "subtitleText", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12subtitleTextSSvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "submitText", - "printedName": "submitText", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10submitTextSSvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10submitTextSSvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10submitTextSSvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10submitTextSSvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10submitTextSSvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10submitTextSSvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV10submitTextSSvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV10submitTextSSvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "stringLengthMin", - "printedName": "stringLengthMin", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32Vvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32VvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMins5Int32VvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "stringLengthMax", - "printedName": "stringLengthMax", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32Vvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32VvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV15stringLengthMaxs5Int32VvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Var", - "name": "initialText", - "printedName": "initialText", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Var", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvp", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvp", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "HasInitialValue", - "HasStorage", - "AccessControl" - ], - "hasStorage": true, - "accessors": [ - { - "kind": "Accessor", - "name": "Get", - "printedName": "Get()", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvg", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvg", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "get" - }, - { - "kind": "Accessor", - "name": "Set", - "printedName": "Set()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "usr": "s:Sq" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvs", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvs", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "set" - }, - { - "kind": "Accessor", - "name": "Modify", - "printedName": "Modify()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - } - ], - "declKind": "Accessor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvM", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV11initialTextSSSgvM", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "accessorKind": "_modify" - } - ] - }, - { - "kind": "Constructor", - "name": "init", - "printedName": "init(keyboardMode:headerText:subtitleText:submitText:stringLengthMin:stringLengthMax:initialText:)", - "children": [ - { - "kind": "TypeNominal", - "name": "SoftwareKeyboardUiArgs", - "printedName": "SoftwareKeyboard.SoftwareKeyboardUiArgs", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV" - }, - { - "kind": "TypeNominal", - "name": "KeyboardMode", - "printedName": "SoftwareKeyboard.KeyboardMode", - "usr": "c:@M@SoftwareKeyboard@E@KeyboardMode" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - }, - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - }, - { - "kind": "TypeNominal", - "name": "Int32", - "printedName": "Swift.Int32", - "usr": "s:s5Int32V" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.String?", - "children": [ - { - "kind": "TypeNominal", - "name": "String", - "printedName": "Swift.String", - "usr": "s:SS" - } - ], - "hasDefaultArg": true, - "usr": "s:Sq" - } - ], - "declKind": "Constructor", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV12keyboardMode10headerText08subtitleH006submitH015stringLengthMin0kL3Max07initialH0AcA0bF0O_S3Ss5Int32VANSSSgtcfc", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV12keyboardMode10headerText08subtitleH006submitH015stringLengthMin0kL3Max07initialH0AcA0bF0O_S3Ss5Int32VANSSSgtcfc", - "moduleName": "SoftwareKeyboard", - "implicit": true, - "init_kind": "Designated" - } - ], - "declKind": "Struct", - "usr": "s:16SoftwareKeyboard0aB6UiArgsV", - "mangledName": "$s16SoftwareKeyboard0aB6UiArgsV", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "AccessControl", - "RawDocComment" - ], - "conformances": [ - { - "kind": "Conformance", - "name": "Copyable", - "printedName": "Copyable", - "usr": "s:s8CopyableP", - "mangledName": "$ss8CopyableP" - }, - { - "kind": "Conformance", - "name": "Escapable", - "printedName": "Escapable", - "usr": "s:s9EscapableP", - "mangledName": "$ss9EscapableP" - } - ] - }, - { - "kind": "Function", - "name": "displayInputDialog", - "printedName": "displayInputDialog(argsPointer:callback:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.UnsafeRawPointer?", - "children": [ - { - "kind": "TypeNominal", - "name": "UnsafeRawPointer", - "printedName": "Swift.UnsafeRawPointer", - "usr": "s:SV" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeFunc", - "name": "Function", - "printedName": "(Swift.UnsafePointer?, Swift.Bool) -> ()", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "Tuple", - "printedName": "(Swift.UnsafePointer?, Swift.Bool)", - "children": [ - { - "kind": "TypeNominal", - "name": "Optional", - "printedName": "Swift.UnsafePointer?", - "children": [ - { - "kind": "TypeNominal", - "name": "UnsafePointer", - "printedName": "Swift.UnsafePointer", - "children": [ - { - "kind": "TypeNominal", - "name": "Int8", - "printedName": "Swift.Int8", - "usr": "s:s4Int8V" - } - ], - "usr": "s:SP" - } - ], - "usr": "s:Sq" - }, - { - "kind": "TypeNominal", - "name": "Bool", - "printedName": "Swift.Bool", - "usr": "s:Sb" - } - ] - } - ] - } - ], - "declKind": "Func", - "usr": "c:(cm)displayInputDialogWithArgsPointer:callback:", - "mangledName": "$s16SoftwareKeyboard18displayInputDialog11argsPointer8callbackySVSg_ySPys4Int8VGSg_SbtXCtF", - "moduleName": "SoftwareKeyboard", - "declAttributes": [ - "CDecl" - ], - "funcSelfKind": "NonMutating" - } - ], - "json_format_version": 8 - }, - "ConstValues": [ - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 201, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 264, - "length": 1, - "value": "1" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 321, - "length": 1, - "value": "2" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 390, - "length": 1, - "value": "3" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 448, - "length": 1, - "value": "4" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 533, - "length": 1, - "value": "5" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 588, - "length": 1, - "value": "6" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 631, - "length": 1, - "value": "7" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 679, - "length": 1, - "value": "8" - }, - { - "filePath": "\/Users\/stossy11\/Developer\/Xcode\/SoftwareKeyboard\/SoftwareKeyboard\/KeyboardMode.swift", - "kind": "IntegerLiteral", - "offset": 734, - "length": 1, - "value": "9" - } - ] -} \ No newline at end of file diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.private.swiftinterface b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.private.swiftinterface deleted file mode 100644 index 6e592e37c..000000000 --- a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.private.swiftinterface +++ /dev/null @@ -1,38 +0,0 @@ -// swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.4 clang-1600.0.30) -// swift-module-flags: -target arm64-apple-ios14.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Onone -enable-experimental-feature OpaqueTypeErasure -enable-bare-slash-regex -module-name SoftwareKeyboard -@_exported import SoftwareKeyboard -import Swift -import UIKit -import _Concurrency -import _StringProcessing -import _SwiftConcurrencyShims -@objc public enum KeyboardMode : Swift.UInt32 { - case `default` = 0 - case numeric = 1 - case ascii = 2 - case fullLatin = 3 - case alphabet = 4 - case simplifiedChinese = 5 - case traditionalChinese = 6 - case korean = 7 - case languageSet2 = 8 - case languageSet2Latin = 9 - public init?(rawValue: Swift.UInt32) - public typealias RawValue = Swift.UInt32 - public var rawValue: Swift.UInt32 { - get - } -} -public struct SoftwareKeyboardUiArgs { - public var keyboardMode: SoftwareKeyboard.KeyboardMode - public var headerText: Swift.String - public var subtitleText: Swift.String - public var submitText: Swift.String - public var stringLengthMin: Swift.Int32 - public var stringLengthMax: Swift.Int32 - public var initialText: Swift.String? -} -extension SoftwareKeyboard.KeyboardMode : Swift.Equatable {} -extension SoftwareKeyboard.KeyboardMode : Swift.Hashable {} -extension SoftwareKeyboard.KeyboardMode : Swift.RawRepresentable {} diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftdoc b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftdoc deleted file mode 100644 index 18db4fca2..000000000 Binary files a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftdoc and /dev/null differ diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftinterface b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftinterface deleted file mode 100644 index 6e592e37c..000000000 --- a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftinterface +++ /dev/null @@ -1,38 +0,0 @@ -// swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 6.0.3 effective-5.10 (swiftlang-6.0.3.1.4 clang-1600.0.30) -// swift-module-flags: -target arm64-apple-ios14.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Onone -enable-experimental-feature OpaqueTypeErasure -enable-bare-slash-regex -module-name SoftwareKeyboard -@_exported import SoftwareKeyboard -import Swift -import UIKit -import _Concurrency -import _StringProcessing -import _SwiftConcurrencyShims -@objc public enum KeyboardMode : Swift.UInt32 { - case `default` = 0 - case numeric = 1 - case ascii = 2 - case fullLatin = 3 - case alphabet = 4 - case simplifiedChinese = 5 - case traditionalChinese = 6 - case korean = 7 - case languageSet2 = 8 - case languageSet2Latin = 9 - public init?(rawValue: Swift.UInt32) - public typealias RawValue = Swift.UInt32 - public var rawValue: Swift.UInt32 { - get - } -} -public struct SoftwareKeyboardUiArgs { - public var keyboardMode: SoftwareKeyboard.KeyboardMode - public var headerText: Swift.String - public var subtitleText: Swift.String - public var submitText: Swift.String - public var stringLengthMin: Swift.Int32 - public var stringLengthMax: Swift.Int32 - public var initialText: Swift.String? -} -extension SoftwareKeyboard.KeyboardMode : Swift.Equatable {} -extension SoftwareKeyboard.KeyboardMode : Swift.Hashable {} -extension SoftwareKeyboard.KeyboardMode : Swift.RawRepresentable {} diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftmodule b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftmodule deleted file mode 100644 index 9af1137c9..000000000 Binary files a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/SoftwareKeyboard.swiftmodule/arm64-apple-ios.swiftmodule and /dev/null differ diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/module.modulemap b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/module.modulemap deleted file mode 100644 index fe4bafa88..000000000 --- a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SoftwareKeyboard { - umbrella header "SoftwareKeyboard.h" - export * - - module * { export * } -} diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/SoftwareKeyboard b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/SoftwareKeyboard deleted file mode 100755 index ef8226a32..000000000 Binary files a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/SoftwareKeyboard.framework/SoftwareKeyboard and /dev/null differ diff --git a/src/MeloNX/MeloNX/MeloNXApp.swift b/src/MeloNX/MeloNX/MeloNXApp.swift index b2d45b784..a8105777b 100644 --- a/src/MeloNX/MeloNX/MeloNXApp.swift +++ b/src/MeloNX/MeloNX/MeloNXApp.swift @@ -21,7 +21,7 @@ struct MeloNXApp: App { var body: some Scene { WindowGroup { ZStack { - if showed { + if showed || DRM != 1 { ContentView() } else { Group { @@ -137,10 +137,12 @@ struct MeloNXApp: App { } func showDMCAAlert() -> UIAlertController? { - if let mainWindow = UIApplication.shared.windows.last { + if let mainWindow = UIApplication.shared.windows.first { let alertController = UIAlertController(title: "Unauthorized Copy Notice", message: "This app was illegally leaked. Please report the download on the MeloNX Discord. In the meantime, check out Pomelo! \n -Stossy11", preferredStyle: .alert) - mainWindow.rootViewController!.present(alertController, animated: true, completion: nil) + DispatchQueue.main.async { + mainWindow.rootViewController!.present(alertController, animated: true, completion: nil) + } return alertController } else { diff --git a/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs b/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs index 9fc7c6b6d..42a2909dc 100644 --- a/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs +++ b/src/Ryujinx.Ava/UI/Applet/AvaHostUiHandler.cs @@ -98,43 +98,10 @@ namespace Ryujinx.Ava.UI.Applet return okPressed; } - public bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText) + public void DisplayInputDialog(SoftwareKeyboardUiArgs args, Action onTextEntered) { - ManualResetEvent dialogCloseEvent = new(false); - - bool okPressed = false; - bool error = false; - string inputText = args.InitialText ?? ""; - - Dispatcher.UIThread.InvokeAsync(async () => - { - try - { - var response = await SwkbdAppletDialog.ShowInputDialog(LocaleManager.Instance[LocaleKeys.SoftwareKeyboard], args); - - if (response.Result == UserResult.Ok) - { - inputText = response.Input; - okPressed = true; - } - } - catch (Exception ex) - { - error = true; - - await ContentDialogHelper.CreateErrorDialog(LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.DialogSoftwareKeyboardErrorExceptionMessage, ex)); - } - finally - { - dialogCloseEvent.Set(); - } - }); - - dialogCloseEvent.WaitOne(); - - userText = error ? null : inputText; - - return error || okPressed; + onTextEntered?.Invoke("MeloNX"); + return; } public void ExecuteProgram(Switch device, ProgramSpecifyKind kind, ulong value) diff --git a/src/Ryujinx.Graphics.Vulkan/DescriptorSetManager.cs b/src/Ryujinx.Graphics.Vulkan/DescriptorSetManager.cs index 7594384d6..7e3e4568b 100644 --- a/src/Ryujinx.Graphics.Vulkan/DescriptorSetManager.cs +++ b/src/Ryujinx.Graphics.Vulkan/DescriptorSetManager.cs @@ -6,7 +6,7 @@ namespace Ryujinx.Graphics.Vulkan { class DescriptorSetManager : IDisposable { - public const uint MaxSets = 16; + public const uint MaxSets = 32; public class DescriptorPoolHolder : IDisposable { diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 88fefac45..f04bb4e22 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -14,6 +14,8 @@ using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; +using System.Threading.Tasks; + namespace Ryujinx.HLE.HOS.Applets { @@ -51,10 +53,10 @@ namespace Ryujinx.HLE.HOS.Applets private byte[] _transferMemory; - private string _textValue = ""; + public string _textValue = ""; private int _cursorBegin = 0; private Encoding _encoding = Encoding.Unicode; - private KeyboardResult _lastResult = KeyboardResult.NotSet; + public KeyboardResult _lastResult = KeyboardResult.NotSet; private IDynamicTextInputHandler _dynamicTextInputHandler = null; private SoftwareKeyboardRenderer _keyboardRenderer = null; @@ -180,9 +182,6 @@ namespace Ryujinx.HLE.HOS.Applets return _keyboardRenderer?.DrawTo(destination, position) ?? false; } - [DllImport("SoftwareKeyboard.framework/SoftwareKeyboard", EntryPoint = "displayInputDialog", CallingConvention = CallingConvention.Cdecl)] - public static extern void DisplayInputDialog(ref SoftwareKeyboardUiArgs args, out IntPtr userInput); - private void ExecuteForegroundKeyboard() { @@ -223,26 +222,8 @@ namespace Ryujinx.HLE.HOS.Applets InitialText = initialText, }; - IntPtr userInputPtr; - - DisplayInputDialog(ref args, out userInputPtr); - if (userInputPtr != IntPtr.Zero) - { - // Convert the IntPtr to a string - string userInput = Marshal.PtrToStringAnsi(userInputPtr); - - _textValue = userInput ?? DefaultInputText; - _lastResult = KeyboardResult.Accept; - - Console.WriteLine($"User input: {userInput}"); - } - else - { - Console.WriteLine("No input was received or input was canceled."); - - _textValue = DefaultInputText; - _lastResult = KeyboardResult.Cancel; - } + _textValue = DefaultInputText; + _lastResult = KeyboardResult.Cancel; } else { @@ -259,37 +240,40 @@ namespace Ryujinx.HLE.HOS.Applets StringLengthMax = _keyboardForegroundConfig.StringLengthMax, InitialText = initialText, }; + _device.UiHandler.DisplayInputDialog(args, inputText => + { + Console.WriteLine($"User entered: {inputText}"); + + _textValue = inputText ?? initialText ?? DefaultInputText; + _lastResult = !string.IsNullOrEmpty(inputText) ? KeyboardResult.Accept : KeyboardResult.Cancel; - _lastResult = _device.UiHandler.DisplayInputDialog(args, out _textValue) ? KeyboardResult.Accept : KeyboardResult.Cancel; - _textValue ??= initialText ?? DefaultInputText; - } + while (_textValue.Length < _keyboardForegroundConfig.StringLengthMin) + { + _textValue = string.Join(" ", _textValue, _textValue); + } - // Ensure the text meets the minimum length requirement - while (_textValue.Length < _keyboardForegroundConfig.StringLengthMin) - { - _textValue = string.Join(" ", _textValue, _textValue); - } + // Truncate the text if it exceeds the maximum length + if (_textValue.Length > _keyboardForegroundConfig.StringLengthMax) + { + _textValue = _textValue[.._keyboardForegroundConfig.StringLengthMax]; + } - // Truncate the text if it exceeds the maximum length - if (_textValue.Length > _keyboardForegroundConfig.StringLengthMax) - { - _textValue = _textValue[.._keyboardForegroundConfig.StringLengthMax]; - } + // Handle text validation if required + if (_keyboardForegroundConfig.CheckText) + { + // Submit text for validation + _foregroundState = SoftwareKeyboardState.ValidationPending; + PushForegroundResponse(true); + } + else + { + // Submit text as complete + _foregroundState = SoftwareKeyboardState.Complete; + PushForegroundResponse(false); - // Handle text validation if required - if (_keyboardForegroundConfig.CheckText) - { - // Submit text for validation - _foregroundState = SoftwareKeyboardState.ValidationPending; - PushForegroundResponse(true); - } - else - { - // Submit text as complete - _foregroundState = SoftwareKeyboardState.Complete; - PushForegroundResponse(false); - - AppletStateChanged?.Invoke(this, null); + AppletStateChanged?.Invoke(this, null); + } + }); } } diff --git a/src/Ryujinx.HLE/Ui/IHostUiHandler.cs b/src/Ryujinx.HLE/Ui/IHostUiHandler.cs index 68f78f22d..105e9dd90 100644 --- a/src/Ryujinx.HLE/Ui/IHostUiHandler.cs +++ b/src/Ryujinx.HLE/Ui/IHostUiHandler.cs @@ -1,5 +1,6 @@ using Ryujinx.HLE.HOS.Applets; using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types; +using System; namespace Ryujinx.HLE.Ui { @@ -10,7 +11,7 @@ namespace Ryujinx.HLE.Ui /// /// Text that the user entered. Set to `null` on internal errors /// True when OK is pressed, False otherwise. Also returns True on internal errors - bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText); + public void DisplayInputDialog(SoftwareKeyboardUiArgs args, Action onTextEntered); /// /// Displays a Message Dialog box to the user and blocks until it is closed. diff --git a/src/Ryujinx.Headless.SDL2/Keyboard-iOS.cs b/src/Ryujinx.Headless.SDL2/Keyboard-iOS.cs new file mode 100644 index 000000000..88af25318 --- /dev/null +++ b/src/Ryujinx.Headless.SDL2/Keyboard-iOS.cs @@ -0,0 +1,42 @@ +using System; +using System.Runtime.InteropServices; +using Ryujinx.Ui.Common.Helper; +using System.Threading; + +namespace Ryujinx.Headless.SDL2 +{ + public static class AlertHelper + { + [DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)] + public static extern void showKeyboardAlert(string title, string message, string placeholder); + + [DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)] + private static extern IntPtr getKeyboardInput(); + + [DllImport("RyujinxKeyboard.framework/RyujinxKeyboard", CallingConvention = CallingConvention.Cdecl)] + private static extern void clearKeyboardInput(); + + public static void ShowAlertWithTextInput(string title, string message, string placeholder, Action onTextEntered) + { + showKeyboardAlert(title, message, placeholder); + + ThreadPool.QueueUserWorkItem(_ => + { + string result = null; + while (result == null) + { + Thread.Sleep(100); + + IntPtr inputPtr = getKeyboardInput(); + if (inputPtr != IntPtr.Zero) + { + result = Marshal.PtrToStringAnsi(inputPtr); + clearKeyboardInput(); + + onTextEntered?.Invoke(result); + } + } + }); + } + } +} diff --git a/src/Ryujinx.Headless.SDL2/WindowBase.cs b/src/Ryujinx.Headless.SDL2/WindowBase.cs index 2a39ad810..13c18ac8f 100644 --- a/src/Ryujinx.Headless.SDL2/WindowBase.cs +++ b/src/Ryujinx.Headless.SDL2/WindowBase.cs @@ -460,12 +460,19 @@ namespace Ryujinx.Headless.SDL2 Exit(); } - public bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText) + public void DisplayInputDialog(SoftwareKeyboardUiArgs args, Action onTextEntered) { // SDL2 doesn't support input dialogs - userText = "Ryujinx"; - - return true; + // Trying to use Objective-C on iDevices + if (OperatingSystem.IsIOS()) + { + AlertHelper.ShowAlertWithTextInput(args.HeaderText, args.SubtitleText, args.GuideText, (inputText) => + { + onTextEntered?.Invoke(inputText); + }); + } else { + onTextEntered?.Invoke(""); + } } public bool DisplayMessageDialog(string title, string message) diff --git a/src/Ryujinx/Ui/Applet/GtkHostUiHandler.cs b/src/Ryujinx/Ui/Applet/GtkHostUiHandler.cs index 241e5e6cf..fcd6cf589 100644 --- a/src/Ryujinx/Ui/Applet/GtkHostUiHandler.cs +++ b/src/Ryujinx/Ui/Applet/GtkHostUiHandler.cs @@ -81,57 +81,10 @@ namespace Ryujinx.Ui.Applet return okPressed; } - public bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText) + public void DisplayInputDialog(SoftwareKeyboardUiArgs args, Action onTextEntered) { - ManualResetEvent dialogCloseEvent = new(false); - - bool okPressed = false; - bool error = false; - string inputText = args.InitialText ?? ""; - - Application.Invoke(delegate - { - try - { - var swkbdDialog = new SwkbdAppletDialog(_parent) - { - Title = "Software Keyboard", - Text = args.HeaderText, - SecondaryText = args.SubtitleText, - }; - - swkbdDialog.InputEntry.Text = inputText; - swkbdDialog.InputEntry.PlaceholderText = args.GuideText; - swkbdDialog.OkButton.Label = args.SubmitText; - - swkbdDialog.SetInputLengthValidation(args.StringLengthMin, args.StringLengthMax); - swkbdDialog.SetInputValidation(args.KeyboardMode); - - if (swkbdDialog.Run() == (int)ResponseType.Ok) - { - inputText = swkbdDialog.InputEntry.Text; - okPressed = true; - } - - swkbdDialog.Dispose(); - } - catch (Exception ex) - { - error = true; - - GtkDialog.CreateErrorDialog($"Error displaying Software Keyboard: {ex}"); - } - finally - { - dialogCloseEvent.Set(); - } - }); - - dialogCloseEvent.WaitOne(); - - userText = error ? null : inputText; - - return error || okPressed; + onTextEntered?.Invoke("MeloNX"); + return; } public void ExecuteProgram(HLE.Switch device, ProgramSpecifyKind kind, ulong value)