fix virtual controller and update constants

This commit is contained in:
Stossy11 2025-06-18 07:15:20 +10:00
parent bfa3e25d9e
commit 2348f5f4b1
5 changed files with 7 additions and 15 deletions

View file

@ -35,7 +35,6 @@ class InGameSettingsManager: PerGameSettingsManaging {
Ryujinx.shared.config = config[currentgame.titleId]
let args = Ryujinx.shared.buildCommandLineArgs(from: config[currentgame.titleId] ?? Ryujinx.Arguments())
// Convert Arguments to ones that Ryujinx can Read
let cArgs = args.map { strdup($0) }
defer { cArgs.forEach { free($0) } }
var argvPtrs = cArgs

View file

@ -81,8 +81,6 @@ struct ContentView: View {
_settings = State(initialValue: defaultSettings)
// print(SDL_CONTROLLER_BUTTON_LEFTSTICK.rawValue)
initializeSDL()
}
@ -132,7 +130,6 @@ struct ContentView: View {
JITPopover() {
ryujinx.jitenabled = false
}
// .interactiveDismissDisabled()
}
}
@ -153,11 +150,8 @@ struct ContentView: View {
refreshControllersList()
}
UserDefaults.standard.set(false, forKey: "lockInApp")
// print(MTLHud.shared.isEnabled)
initControllerObservers()
Air.play(AnyView(
@ -166,7 +160,6 @@ struct ContentView: View {
refreshControllersList()
ryujinx.addGames()
checkJitStatus()
@ -287,7 +280,6 @@ struct ContentView: View {
queue: .main
) { notification in
if let controller = notification.object as? GCController {
// print("Controller connected: \(controller.productCategory)")
nativeControllers[controller] = .init(controller)
refreshControllersList()
}
@ -299,7 +291,8 @@ struct ContentView: View {
queue: .main
) { notification in
if let controller = notification.object as? GCController {
// print("Controller disconnected: \(controller.productCategory)")
currentControllers = []
controllersList = []
nativeControllers[controller]?.cleanup()
nativeControllers[controller] = nil
refreshControllersList()
@ -316,6 +309,9 @@ struct ContentView: View {
}
private func refreshControllersList() {
currentControllers = []
controllersList = []
controllersList = ryujinx.getConnectedControllers()
if let onscreen = controllersList.first(where: { $0.name == ryujinx.virtualController.controllername }) {
@ -324,8 +320,6 @@ struct ContentView: View {
controllersList.removeAll(where: { $0.id == "0" || (!$0.name.starts(with: "GC - ") && $0 != onscreencontroller) })
controllersList.mutableForEach { $0.name = $0.name.replacingOccurrences(of: "GC - ", with: "") }
currentControllers = []
if controllersList.count == 1 {
currentControllers.append(controllersList[0])

View file

@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Vulkan
public const int MaxShaderStages = 5;
public const int MaxUniformBuffersPerStage = 18;
public const int MaxStorageBuffersPerStage = 16;
public const int MaxTexturesPerStage = 18;
public const int MaxTexturesPerStage = 31;
public const int MaxImagesPerStage = 16;
public const int MaxUniformBufferBindings = MaxUniformBuffersPerStage * MaxShaderStages;
public const int MaxStorageBufferBindings = MaxStorageBuffersPerStage * MaxShaderStages;

View file

@ -649,8 +649,7 @@ namespace Ryujinx.Graphics.Vulkan
if (!OperatingSystem.IsIOSVersionAtLeast(16, 4))
{
// On iOS 16.4 and later, these formats are supported.
// On earlier versions, it is not supported.
// On iOS 16.3.1 and earlier, these formats are not supported.
supportsBc123CompressionFormat = false;
supportsBc45CompressionFormat = false;
supportsBc67CompressionFormat = false;