Add Trollstore JIT

This commit is contained in:
Catsoftware 2024-12-20 18:44:35 +00:00
parent 86c93fe163
commit 2fbe6eb9da
6 changed files with 47 additions and 4 deletions

View 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
}

View File

@ -26,7 +26,7 @@ BOOL getEntitlementValue(NSString *key)
return value != nil && [(__bridge id)value boolValue];
}
BOOL isJITEnabled(void)
BOOL isJITEnabled(void)
{
if (getEntitlementValue(@"dynamic-codesigning"))
{

View File

@ -28,6 +28,7 @@ struct ContentView: View {
@State private var currentControllers: [Controller] = []
@State private var config: Ryujinx.Configuration
@State private var settings: [MoltenVKSettings]
@AppStorage("useTrollStore") var useTrollStore: Bool = false
@State private var isVirtualControllerActive: Bool = false
@AppStorage("isVirtualController") var isVCA: Bool = true
@State var onscreencontroller: Controller = Controller(id: "", name: "")
@ -77,12 +78,16 @@ struct ContentView: View {
quits = false
}
}
}
// MARK: - View Components
private var emulationView: some View {
ZStack {}
ZStack {
}
.onAppear {
setupEmulation()
}
}
@ -91,6 +96,14 @@ struct ContentView: View {
MainTabView(startemu: $game, config: $config, MVKconfig: $settings, controllersList: $controllersList, currentControllers: $currentControllers, onscreencontroller: $onscreencontroller)
.onAppear() {
refreshControllersList()
let isJIT = UserDefaults.standard.bool(forKey: "JIT-ENABLED")
if !isJIT, useTrollStore {
askForJIT()
}
}
}

View File

@ -15,6 +15,7 @@ struct SettingsView: View {
@Binding var currentControllers: [Controller]
@Binding var onscreencontroller: Controller
@AppStorage("useTrollStore") var useTrollStore: Bool = false
@AppStorage("ignoreJIT") var ignoreJIT: Bool = false
@ -59,7 +60,11 @@ struct SettingsView: View {
labelWithIcon("Disable Docked Mode", iconName: "dock.rectangle")
}
.tint(.blue)
Toggle(isOn: $useTrollStore) {
labelWithIcon("Trollstore", iconName: "stroller")
}
.tint(.blue)
VStack(alignment: .leading, spacing: 10) {
HStack {
labelWithIcon("Resolution Scale", iconName: "magnifyingglass")