forked from MeloNX/MeloNX
Lower mem usage and other changes
This commit is contained in:
parent
11ec203e9f
commit
31b10799a3
@ -580,6 +580,12 @@
|
|||||||
"$(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",
|
||||||
|
"$(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;
|
MARKETING_VERSION = 0.0.8;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||||
@ -694,6 +700,12 @@
|
|||||||
"$(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",
|
||||||
|
"$(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;
|
MARKETING_VERSION = 0.0.8;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
PRODUCT_BUNDLE_IDENTIFIER = com.stossy11.MeloNX;
|
||||||
|
Binary file not shown.
@ -14,33 +14,27 @@ public var controllerCallback: (() -> Void)?
|
|||||||
var VirtualController: GCVirtualController!
|
var VirtualController: GCVirtualController!
|
||||||
func showVirtualController() {
|
func showVirtualController() {
|
||||||
let config = GCVirtualController.Configuration()
|
let config = GCVirtualController.Configuration()
|
||||||
if UserDefaults.standard.bool(forKey: "RyuDemoControls") {
|
|
||||||
config.elements = [
|
var controllere = [
|
||||||
GCInputLeftThumbstick,
|
GCInputLeftThumbstick,
|
||||||
GCInputButtonA,
|
GCInputButtonA,
|
||||||
GCInputButtonB,
|
GCInputButtonB,
|
||||||
GCInputButtonX,
|
GCInputButtonX,
|
||||||
GCInputButtonY,
|
GCInputButtonY,
|
||||||
// GCInputRightThumbstick,
|
// GCInputRightThumbstick,
|
||||||
GCInputRightTrigger,
|
GCInputRightTrigger,
|
||||||
GCInputLeftTrigger,
|
GCInputLeftTrigger,
|
||||||
GCInputLeftShoulder,
|
GCInputLeftShoulder,
|
||||||
GCInputRightShoulder
|
GCInputRightShoulder
|
||||||
]
|
]
|
||||||
} else {
|
|
||||||
config.elements = [
|
if !UserDefaults.standard.bool(forKey: "RyuDemoControls") {
|
||||||
GCInputLeftThumbstick,
|
|
||||||
GCInputButtonA,
|
controllere.append(GCInputRightThumbstick)
|
||||||
GCInputButtonB,
|
|
||||||
GCInputButtonX,
|
|
||||||
GCInputButtonY,
|
|
||||||
GCInputRightThumbstick,
|
|
||||||
GCInputRightTrigger,
|
|
||||||
GCInputLeftTrigger,
|
|
||||||
GCInputLeftShoulder,
|
|
||||||
GCInputRightShoulder
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.elements = Set(controllere)
|
||||||
|
|
||||||
VirtualController = GCVirtualController(configuration: config)
|
VirtualController = GCVirtualController(configuration: config)
|
||||||
VirtualController.connect { err in
|
VirtualController.connect { err in
|
||||||
print("controller connect: \(String(describing: err))")
|
print("controller connect: \(String(describing: err))")
|
||||||
|
@ -20,7 +20,7 @@ extension UIWindow {
|
|||||||
self.wdb_makeKeyAndVisible()
|
self.wdb_makeKeyAndVisible()
|
||||||
theWindow = self
|
theWindow = self
|
||||||
if #available(iOS 15.0, *) {
|
if #available(iOS 15.0, *) {
|
||||||
reconnectVirtualController()
|
// reconnectVirtualController()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ class Ryujinx {
|
|||||||
isRunning = true
|
isRunning = true
|
||||||
|
|
||||||
// Start The Emulation on the main thread
|
// Start The Emulation on the main thread
|
||||||
DispatchQueue.main.async {
|
RunLoop.current.perform {
|
||||||
do {
|
do {
|
||||||
let args = self.buildCommandLineArgs(from: config)
|
let args = self.buildCommandLineArgs(from: config)
|
||||||
|
|
||||||
@ -147,27 +147,22 @@ class Ryujinx {
|
|||||||
|
|
||||||
// Fixes the Stubs.DispatchLoop Crash
|
// Fixes the Stubs.DispatchLoop Crash
|
||||||
args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode])
|
args.append(contentsOf: ["--memory-manager-mode", config.memoryManagerMode])
|
||||||
if config.fullscreen {
|
args.append(contentsOf: ["--exclusive-fullscreen", String(config.fullscreen)])
|
||||||
args.append(contentsOf: ["--exclusive-fullscreen", String(config.fullscreen)])
|
args.append(contentsOf: ["--exclusive-fullscreen-width", "1280"])
|
||||||
args.append(contentsOf: ["--exclusive-fullscreen-width", "1280"])
|
args.append(contentsOf: ["--exclusive-fullscreen-height", "720"])
|
||||||
args.append(contentsOf: ["--exclusive-fullscreen-height", "720"])
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.resscale != 1 {
|
|
||||||
args.append(contentsOf: ["--resolution-scale", String(config.resscale)])
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.nintendoinput {
|
if config.nintendoinput {
|
||||||
args.append("--correct-ons-controller")
|
args.append("--correct-controller")
|
||||||
}
|
|
||||||
if config.enableInternet {
|
|
||||||
args.append("--enable-internet-connection")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adding default args directly into additionalArgs
|
// Adding default args directly into additionalArgs
|
||||||
if config.disableVSync {
|
if config.disableVSync {
|
||||||
args.append("--disable-vsync")
|
// args.append("--disable-vsync")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args.append("--disable-vsync")
|
||||||
|
|
||||||
if config.disableShaderCache {
|
if config.disableShaderCache {
|
||||||
args.append("--disable-shader-cache")
|
args.append("--disable-shader-cache")
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,8 @@ struct ContentView: View {
|
|||||||
_config = State(initialValue: defaultConfig)
|
_config = State(initialValue: defaultConfig)
|
||||||
|
|
||||||
let defaultSettings: [MoltenVKSettings] = [
|
let defaultSettings: [MoltenVKSettings] = [
|
||||||
// MoltenVKSettings(string: "MVK_CONFIG_MAX_ACTIVE_METAL_COMMAND_BUFFERS_PER_QUEUE", value: "2048"),
|
// MoltenVKSettings(string: "MVK_CONFIG_MAX_ACTIVE_METAL_COMMAND_BUFFERS_PER_QUEUE", value: "512"),
|
||||||
MoltenVKSettings(string: "MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS", value: "1"),
|
MoltenVKSettings(string: "MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS", value: "0"),
|
||||||
MoltenVKSettings(string: "MVK_CONFIG_RESUME_LOST_DEVICE", value: "1")
|
MoltenVKSettings(string: "MVK_CONFIG_RESUME_LOST_DEVICE", value: "1")
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -161,40 +161,17 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func setupEmulation() {
|
private func setupEmulation() {
|
||||||
if isJITEnabled {
|
virtualController?.disconnect()
|
||||||
virtualController?.disconnect()
|
|
||||||
|
|
||||||
controllerCallback = {
|
controllerCallback = {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
controllersList = Ryujinx.shared.getConnectedControllers()
|
|
||||||
|
start(displayid: 1)
|
||||||
print(currentControllers)
|
|
||||||
start(displayid: 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
showVirtualController()
|
|
||||||
} else {
|
|
||||||
showAlert(title: "JIT Not Enabled", message: "JIT is Required for Emulation. Please use a JIT enabler to Enable JIT", showOk: true) { pressedok in
|
|
||||||
if pressedok, !ignoreJIT {
|
|
||||||
game = nil
|
|
||||||
} else if pressedok, ignoreJIT {
|
|
||||||
virtualController?.disconnect()
|
|
||||||
controllerCallback = {
|
|
||||||
DispatchQueue.main.async {
|
|
||||||
controllersList = Ryujinx.shared.getConnectedControllers()
|
|
||||||
|
|
||||||
print(currentControllers)
|
|
||||||
start(displayid: 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
showVirtualController()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
showVirtualController()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func refreshControllersList() {
|
private func refreshControllersList() {
|
||||||
|
@ -103,11 +103,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||||||
SupportsShaderStencilExport = supportsShaderStencilExport;
|
SupportsShaderStencilExport = supportsShaderStencilExport;
|
||||||
SupportsShaderStorageImageMultisample = supportsShaderStorageImageMultisample;
|
SupportsShaderStorageImageMultisample = supportsShaderStorageImageMultisample;
|
||||||
SupportsConditionalRendering = supportsConditionalRendering;
|
SupportsConditionalRendering = supportsConditionalRendering;
|
||||||
if (OperatingSystem.IsIOS()) {
|
SupportsExtendedDynamicState = supportsExtendedDynamicState;
|
||||||
SupportsExtendedDynamicState = (OperatingSystem.IsOSPlatformVersionAtLeast("iOS", 17) ? supportsExtendedDynamicState : false);
|
|
||||||
} else {
|
|
||||||
SupportsExtendedDynamicState = supportsExtendedDynamicState;
|
|
||||||
}
|
|
||||||
SupportsMultiView = supportsMultiView;
|
SupportsMultiView = supportsMultiView;
|
||||||
SupportsNullDescriptors = (OperatingSystem.IsIOS() ? false : supportsNullDescriptors);
|
SupportsNullDescriptors = (OperatingSystem.IsIOS() ? false : supportsNullDescriptors);
|
||||||
SupportsPushDescriptors = supportsPushDescriptors;
|
SupportsPushDescriptors = supportsPushDescriptors;
|
||||||
|
@ -31,7 +31,7 @@ namespace Ryujinx.Headless.SDL2
|
|||||||
|
|
||||||
// Input
|
// Input
|
||||||
|
|
||||||
[Option("correct-ons-controller", Required = false, Default = false, HelpText = "Makes the on-screen controller (iOS) buttons correspond to what they show.")]
|
[Option("correct-controller", Required = false, Default = false, HelpText = "Makes the on-screen controller (iOS) buttons correspond to what they show.")]
|
||||||
public bool OnScreenCorrespond { get; set; }
|
public bool OnScreenCorrespond { get; set; }
|
||||||
|
|
||||||
[Option("input-profile-1", Required = false, HelpText = "Set the input profile in use for Player 1.")]
|
[Option("input-profile-1", Required = false, HelpText = "Set the input profile in use for Player 1.")]
|
||||||
|
@ -143,7 +143,10 @@ namespace Ryujinx.Headless.SDL2
|
|||||||
{
|
{
|
||||||
List<GamepadInfo> gamepads = new List<GamepadInfo>();
|
List<GamepadInfo> gamepads = new List<GamepadInfo>();
|
||||||
IGamepad gamepad;
|
IGamepad gamepad;
|
||||||
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
|
if (_inputManager == null)
|
||||||
|
{
|
||||||
|
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
|
||||||
|
}
|
||||||
|
|
||||||
// Collect gamepads from the keyboard driver
|
// Collect gamepads from the keyboard driver
|
||||||
foreach (string id in _inputManager.KeyboardDriver.GamepadsIds)
|
foreach (string id in _inputManager.KeyboardDriver.GamepadsIds)
|
||||||
@ -417,7 +420,10 @@ namespace Ryujinx.Headless.SDL2
|
|||||||
_accountManager = new AccountManager(_libHacHorizonManager.RyujinxClient, option.UserProfile);
|
_accountManager = new AccountManager(_libHacHorizonManager.RyujinxClient, option.UserProfile);
|
||||||
_userChannelPersistence = new UserChannelPersistence();
|
_userChannelPersistence = new UserChannelPersistence();
|
||||||
|
|
||||||
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
|
if (_inputManager == null)
|
||||||
|
{
|
||||||
|
_inputManager = new InputManager(new SDL2KeyboardDriver(), new SDL2GamepadDriver());
|
||||||
|
}
|
||||||
|
|
||||||
GraphicsConfig.EnableShaderCache = true;
|
GraphicsConfig.EnableShaderCache = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user