mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-27 19:06:23 +02:00
fix virtual controller and update constants
This commit is contained in:
parent
bfa3e25d9e
commit
2348f5f4b1
5 changed files with 7 additions and 15 deletions
Binary file not shown.
|
@ -35,7 +35,6 @@ class InGameSettingsManager: PerGameSettingsManaging {
|
||||||
Ryujinx.shared.config = config[currentgame.titleId]
|
Ryujinx.shared.config = config[currentgame.titleId]
|
||||||
let args = Ryujinx.shared.buildCommandLineArgs(from: config[currentgame.titleId] ?? Ryujinx.Arguments())
|
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) }
|
let cArgs = args.map { strdup($0) }
|
||||||
defer { cArgs.forEach { free($0) } }
|
defer { cArgs.forEach { free($0) } }
|
||||||
var argvPtrs = cArgs
|
var argvPtrs = cArgs
|
||||||
|
|
|
@ -81,8 +81,6 @@ struct ContentView: View {
|
||||||
|
|
||||||
_settings = State(initialValue: defaultSettings)
|
_settings = State(initialValue: defaultSettings)
|
||||||
|
|
||||||
// print(SDL_CONTROLLER_BUTTON_LEFTSTICK.rawValue)
|
|
||||||
|
|
||||||
initializeSDL()
|
initializeSDL()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +130,6 @@ struct ContentView: View {
|
||||||
JITPopover() {
|
JITPopover() {
|
||||||
ryujinx.jitenabled = false
|
ryujinx.jitenabled = false
|
||||||
}
|
}
|
||||||
// .interactiveDismissDisabled()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,11 +150,8 @@ struct ContentView: View {
|
||||||
refreshControllersList()
|
refreshControllersList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UserDefaults.standard.set(false, forKey: "lockInApp")
|
UserDefaults.standard.set(false, forKey: "lockInApp")
|
||||||
|
|
||||||
// print(MTLHud.shared.isEnabled)
|
|
||||||
|
|
||||||
initControllerObservers()
|
initControllerObservers()
|
||||||
|
|
||||||
Air.play(AnyView(
|
Air.play(AnyView(
|
||||||
|
@ -166,7 +160,6 @@ struct ContentView: View {
|
||||||
|
|
||||||
refreshControllersList()
|
refreshControllersList()
|
||||||
|
|
||||||
|
|
||||||
ryujinx.addGames()
|
ryujinx.addGames()
|
||||||
|
|
||||||
checkJitStatus()
|
checkJitStatus()
|
||||||
|
@ -287,7 +280,6 @@ struct ContentView: View {
|
||||||
queue: .main
|
queue: .main
|
||||||
) { notification in
|
) { notification in
|
||||||
if let controller = notification.object as? GCController {
|
if let controller = notification.object as? GCController {
|
||||||
// print("Controller connected: \(controller.productCategory)")
|
|
||||||
nativeControllers[controller] = .init(controller)
|
nativeControllers[controller] = .init(controller)
|
||||||
refreshControllersList()
|
refreshControllersList()
|
||||||
}
|
}
|
||||||
|
@ -299,7 +291,8 @@ struct ContentView: View {
|
||||||
queue: .main
|
queue: .main
|
||||||
) { notification in
|
) { notification in
|
||||||
if let controller = notification.object as? GCController {
|
if let controller = notification.object as? GCController {
|
||||||
// print("Controller disconnected: \(controller.productCategory)")
|
currentControllers = []
|
||||||
|
controllersList = []
|
||||||
nativeControllers[controller]?.cleanup()
|
nativeControllers[controller]?.cleanup()
|
||||||
nativeControllers[controller] = nil
|
nativeControllers[controller] = nil
|
||||||
refreshControllersList()
|
refreshControllersList()
|
||||||
|
@ -316,6 +309,9 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func refreshControllersList() {
|
private func refreshControllersList() {
|
||||||
|
currentControllers = []
|
||||||
|
controllersList = []
|
||||||
|
|
||||||
controllersList = ryujinx.getConnectedControllers()
|
controllersList = ryujinx.getConnectedControllers()
|
||||||
|
|
||||||
if let onscreen = controllersList.first(where: { $0.name == ryujinx.virtualController.controllername }) {
|
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.removeAll(where: { $0.id == "0" || (!$0.name.starts(with: "GC - ") && $0 != onscreencontroller) })
|
||||||
controllersList.mutableForEach { $0.name = $0.name.replacingOccurrences(of: "GC - ", with: "") }
|
controllersList.mutableForEach { $0.name = $0.name.replacingOccurrences(of: "GC - ", with: "") }
|
||||||
|
|
||||||
currentControllers = []
|
|
||||||
|
|
||||||
if controllersList.count == 1 {
|
if controllersList.count == 1 {
|
||||||
currentControllers.append(controllersList[0])
|
currentControllers.append(controllersList[0])
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
public const int MaxShaderStages = 5;
|
public const int MaxShaderStages = 5;
|
||||||
public const int MaxUniformBuffersPerStage = 18;
|
public const int MaxUniformBuffersPerStage = 18;
|
||||||
public const int MaxStorageBuffersPerStage = 16;
|
public const int MaxStorageBuffersPerStage = 16;
|
||||||
public const int MaxTexturesPerStage = 18;
|
public const int MaxTexturesPerStage = 31;
|
||||||
public const int MaxImagesPerStage = 16;
|
public const int MaxImagesPerStage = 16;
|
||||||
public const int MaxUniformBufferBindings = MaxUniformBuffersPerStage * MaxShaderStages;
|
public const int MaxUniformBufferBindings = MaxUniformBuffersPerStage * MaxShaderStages;
|
||||||
public const int MaxStorageBufferBindings = MaxStorageBuffersPerStage * MaxShaderStages;
|
public const int MaxStorageBufferBindings = MaxStorageBuffersPerStage * MaxShaderStages;
|
||||||
|
|
|
@ -649,8 +649,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
if (!OperatingSystem.IsIOSVersionAtLeast(16, 4))
|
if (!OperatingSystem.IsIOSVersionAtLeast(16, 4))
|
||||||
{
|
{
|
||||||
// On iOS 16.4 and later, these formats are supported.
|
// On iOS 16.3.1 and earlier, these formats are not supported.
|
||||||
// On earlier versions, it is not supported.
|
|
||||||
supportsBc123CompressionFormat = false;
|
supportsBc123CompressionFormat = false;
|
||||||
supportsBc45CompressionFormat = false;
|
supportsBc45CompressionFormat = false;
|
||||||
supportsBc67CompressionFormat = false;
|
supportsBc67CompressionFormat = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue