Configuration: Add GDB stub related configuration
# Conflicts: # Ryujinx/Configuration/ConfigurationState.cs # src/Ryujinx.HLE/HLEConfiguration.cs # src/Ryujinx.Ui.Common/Configuration/ConfigurationFileFormat.cs # src/Ryujinx/Ui/MainWindow.cs # src/Ryujinx/Ui/Windows/SettingsWindow.cs # src/Ryujinx/Ui/Windows/SettingsWindow.glade
This commit is contained in:
parent
20bdea45fa
commit
2a17f1314d
6 changed files with 238 additions and 4 deletions
|
@ -577,6 +577,30 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Debug configuration section
|
||||
/// </summary>
|
||||
public class DebugSection
|
||||
{
|
||||
/// <summary>
|
||||
/// Enables or disables the GDB stub
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> EnableGdbStub { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Which TCP port should the GDB stub listen on
|
||||
/// </summary>
|
||||
public ReactiveObject<ushort> GdbStubPort { get; private set; }
|
||||
|
||||
public DebugSection()
|
||||
{
|
||||
EnableGdbStub = new ReactiveObject<bool>();
|
||||
EnableGdbStub.Event += static (sender, e) => LogValueChange(e, nameof(EnableGdbStub));
|
||||
GdbStubPort = new ReactiveObject<ushort>();
|
||||
GdbStubPort.Event += static (sender, e) => LogValueChange(e, nameof(GdbStubPort));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The default configuration instance
|
||||
/// </summary>
|
||||
|
@ -607,6 +631,11 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
/// </summary>
|
||||
public HidSection Hid { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Debug
|
||||
/// </summary>
|
||||
public DebugSection Debug { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Multiplayer section
|
||||
/// </summary>
|
||||
|
@ -649,6 +678,7 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
System = new SystemSection();
|
||||
Graphics = new GraphicsSection();
|
||||
Hid = new HidSection();
|
||||
Debug = new DebugSection();
|
||||
Multiplayer = new MultiplayerSection();
|
||||
EnableDiscordIntegration = new ReactiveObject<bool>();
|
||||
CheckUpdatesOnStart = new ReactiveObject<bool>();
|
||||
|
@ -766,6 +796,8 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
PreferredGpu = Graphics.PreferredGpu,
|
||||
MultiplayerLanInterfaceId = Multiplayer.LanInterfaceId,
|
||||
MultiplayerMode = Multiplayer.Mode,
|
||||
EnableGdbStub = Debug.EnableGdbStub,
|
||||
GdbStubPort = Debug.GdbStubPort,
|
||||
};
|
||||
|
||||
return configurationFile;
|
||||
|
@ -923,6 +955,8 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
},
|
||||
},
|
||||
};
|
||||
Debug.EnableGdbStub.Value = false;
|
||||
Debug.GdbStubPort.Value = 55555;
|
||||
}
|
||||
|
||||
public void Load(ConfigurationFileFormat configurationFileFormat, string configurationFilePath)
|
||||
|
@ -1437,6 +1471,15 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
|
||||
configurationFileUpdated = true;
|
||||
}
|
||||
if (configurationFileFormat.Version < 48)
|
||||
{
|
||||
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 38.");
|
||||
|
||||
configurationFileFormat.EnableGdbStub = false;
|
||||
configurationFileFormat.GdbStubPort = 55555;
|
||||
|
||||
configurationFileUpdated = true;
|
||||
}
|
||||
|
||||
if (configurationFileFormat.Version < 48)
|
||||
{
|
||||
|
@ -1564,6 +1607,8 @@ namespace Ryujinx.UI.Common.Configuration
|
|||
Hid.EnableMouse.Value = configurationFileFormat.EnableMouse;
|
||||
Hid.Hotkeys.Value = configurationFileFormat.Hotkeys;
|
||||
Hid.InputConfig.Value = configurationFileFormat.InputConfig;
|
||||
Debug.EnableGdbStub.Value = configurationFileFormat.EnableGdbStub;
|
||||
Debug.GdbStubPort.Value = configurationFileFormat.GdbStubPort;
|
||||
|
||||
if (Hid.InputConfig.Value == null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue