forked from MeloNX/MeloNX
Add Trollstore JIT
This commit is contained in:
parent
86c93fe163
commit
2fbe6eb9da
BIN
src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/ls.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
BIN
src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/ls.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
Binary file not shown.
25
src/MeloNX/MeloNX/Core/JIT/AskForJIT.swift
Normal file
25
src/MeloNX/MeloNX/Core/JIT/AskForJIT.swift
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// AskForJIT.swift
|
||||||
|
// Pomelo
|
||||||
|
//
|
||||||
|
// Created by Stossy11 on 9/10/2024.
|
||||||
|
// Copyright © 2024 Stossy11. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
func askForJIT() {
|
||||||
|
// Check if TrollStore exists by checking the presence of the directory
|
||||||
|
let urlScheme = "apple-magnifier://enable-jit?bundle-id=\(Bundle.main.bundleIdentifier!)"
|
||||||
|
if let launchURL = URL(string: urlScheme) {
|
||||||
|
if UIApplication.shared.canOpenURL(launchURL) {
|
||||||
|
// Open the URL to enable JIT
|
||||||
|
UIApplication.shared.open(launchURL, options: [:], completionHandler: nil)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
@ -28,6 +28,7 @@ struct ContentView: View {
|
|||||||
@State private var currentControllers: [Controller] = []
|
@State private var currentControllers: [Controller] = []
|
||||||
@State private var config: Ryujinx.Configuration
|
@State private var config: Ryujinx.Configuration
|
||||||
@State private var settings: [MoltenVKSettings]
|
@State private var settings: [MoltenVKSettings]
|
||||||
|
@AppStorage("useTrollStore") var useTrollStore: Bool = false
|
||||||
@State private var isVirtualControllerActive: Bool = false
|
@State private var isVirtualControllerActive: Bool = false
|
||||||
@AppStorage("isVirtualController") var isVCA: Bool = true
|
@AppStorage("isVirtualController") var isVCA: Bool = true
|
||||||
@State var onscreencontroller: Controller = Controller(id: "", name: "")
|
@State var onscreencontroller: Controller = Controller(id: "", name: "")
|
||||||
@ -77,12 +78,16 @@ struct ContentView: View {
|
|||||||
quits = false
|
quits = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - View Components
|
// MARK: - View Components
|
||||||
private var emulationView: some View {
|
private var emulationView: some View {
|
||||||
ZStack {}
|
ZStack {
|
||||||
|
|
||||||
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
|
||||||
setupEmulation()
|
setupEmulation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,6 +96,14 @@ struct ContentView: View {
|
|||||||
MainTabView(startemu: $game, config: $config, MVKconfig: $settings, controllersList: $controllersList, currentControllers: $currentControllers, onscreencontroller: $onscreencontroller)
|
MainTabView(startemu: $game, config: $config, MVKconfig: $settings, controllersList: $controllersList, currentControllers: $currentControllers, onscreencontroller: $onscreencontroller)
|
||||||
.onAppear() {
|
.onAppear() {
|
||||||
refreshControllersList()
|
refreshControllersList()
|
||||||
|
|
||||||
|
|
||||||
|
let isJIT = UserDefaults.standard.bool(forKey: "JIT-ENABLED")
|
||||||
|
|
||||||
|
if !isJIT, useTrollStore {
|
||||||
|
askForJIT()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ struct SettingsView: View {
|
|||||||
@Binding var currentControllers: [Controller]
|
@Binding var currentControllers: [Controller]
|
||||||
|
|
||||||
@Binding var onscreencontroller: Controller
|
@Binding var onscreencontroller: Controller
|
||||||
|
@AppStorage("useTrollStore") var useTrollStore: Bool = false
|
||||||
|
|
||||||
@AppStorage("ignoreJIT") var ignoreJIT: Bool = false
|
@AppStorage("ignoreJIT") var ignoreJIT: Bool = false
|
||||||
|
|
||||||
@ -59,6 +60,10 @@ struct SettingsView: View {
|
|||||||
labelWithIcon("Disable Docked Mode", iconName: "dock.rectangle")
|
labelWithIcon("Disable Docked Mode", iconName: "dock.rectangle")
|
||||||
}
|
}
|
||||||
.tint(.blue)
|
.tint(.blue)
|
||||||
|
Toggle(isOn: $useTrollStore) {
|
||||||
|
labelWithIcon("Trollstore", iconName: "stroller")
|
||||||
|
}
|
||||||
|
.tint(.blue)
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
HStack {
|
HStack {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user