TESTERS WANTED: RyuLDN implementation (#65)
These changes allow players to matchmake for local wireless using a LDN server. The network implementation originates from Berry's public TCP RyuLDN fork. Logo and unrelated changes have been removed. Additionally displays LDN game status in the game selection window when RyuLDN is enabled. Functionality is only enabled while network mode is set to "RyuLDN" in the settings.
This commit is contained in:
@@ -392,6 +392,21 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
/// </summary>
|
||||
public string MultiplayerLanInterfaceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disable P2p Toggle
|
||||
/// </summary>
|
||||
public bool MultiplayerDisableP2p { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Local network passphrase, for private networks.
|
||||
/// </summary>
|
||||
public string MultiplayerLdnPassphrase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Custom LDN Server
|
||||
/// </summary>
|
||||
public string LdnServer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Uses Hypervisor over JIT if available
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Configuration.Hid;
|
||||
using Ryujinx.Common.Configuration.Hid.Controller;
|
||||
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
||||
@@ -703,6 +703,9 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
|
||||
Multiplayer.LanInterfaceId.Value = configurationFileFormat.MultiplayerLanInterfaceId;
|
||||
Multiplayer.Mode.Value = configurationFileFormat.MultiplayerMode;
|
||||
Multiplayer.DisableP2p.Value = configurationFileFormat.MultiplayerDisableP2p;
|
||||
Multiplayer.LdnPassphrase.Value = configurationFileFormat.MultiplayerLdnPassphrase;
|
||||
Multiplayer.LdnServer.Value = configurationFileFormat.LdnServer;
|
||||
|
||||
if (configurationFileUpdated)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
{
|
||||
public partial class ConfigurationState
|
||||
{
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// UI configuration section
|
||||
/// </summary>
|
||||
public class UISection
|
||||
@@ -25,6 +25,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
public ReactiveObject<bool> AppColumn { get; private set; }
|
||||
public ReactiveObject<bool> DevColumn { get; private set; }
|
||||
public ReactiveObject<bool> VersionColumn { get; private set; }
|
||||
public ReactiveObject<bool> LdnInfoColumn { get; private set; }
|
||||
public ReactiveObject<bool> TimePlayedColumn { get; private set; }
|
||||
public ReactiveObject<bool> LastPlayedColumn { get; private set; }
|
||||
public ReactiveObject<bool> FileExtColumn { get; private set; }
|
||||
@@ -38,6 +39,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
AppColumn = new ReactiveObject<bool>();
|
||||
DevColumn = new ReactiveObject<bool>();
|
||||
VersionColumn = new ReactiveObject<bool>();
|
||||
LdnInfoColumn = new ReactiveObject<bool>();
|
||||
TimePlayedColumn = new ReactiveObject<bool>();
|
||||
LastPlayedColumn = new ReactiveObject<bool>();
|
||||
FileExtColumn = new ReactiveObject<bool>();
|
||||
@@ -572,11 +574,32 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
/// </summary>
|
||||
public ReactiveObject<MultiplayerMode> Mode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Disable P2P
|
||||
/// </summary>
|
||||
public ReactiveObject<bool> DisableP2p { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// LDN PassPhrase
|
||||
/// </summary>
|
||||
public ReactiveObject<string> LdnPassphrase { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// LDN Server
|
||||
/// </summary>
|
||||
public ReactiveObject<string> LdnServer { get; private set; }
|
||||
|
||||
public MultiplayerSection()
|
||||
{
|
||||
LanInterfaceId = new ReactiveObject<string>();
|
||||
Mode = new ReactiveObject<MultiplayerMode>();
|
||||
Mode.LogChangesToValue(nameof(MultiplayerMode));
|
||||
DisableP2p = new ReactiveObject<bool>();
|
||||
DisableP2p.LogChangesToValue(nameof(DisableP2p));
|
||||
LdnPassphrase = new ReactiveObject<string>();
|
||||
LdnPassphrase.LogChangesToValue(nameof(LdnPassphrase));
|
||||
LdnServer = new ReactiveObject<string>();
|
||||
LdnServer.LogChangesToValue(nameof(LdnServer));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
if (Instance != null)
|
||||
{
|
||||
throw new InvalidOperationException("Configuration is already initialized");
|
||||
}
|
||||
}
|
||||
|
||||
Instance = new ConfigurationState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ConfigurationFileFormat ToFileFormat()
|
||||
{
|
||||
ConfigurationFileFormat configurationFile = new()
|
||||
@@ -87,6 +87,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
AppColumn = UI.GuiColumns.AppColumn,
|
||||
DevColumn = UI.GuiColumns.DevColumn,
|
||||
VersionColumn = UI.GuiColumns.VersionColumn,
|
||||
LdnInfoColumn = UI.GuiColumns.LdnInfoColumn,
|
||||
TimePlayedColumn = UI.GuiColumns.TimePlayedColumn,
|
||||
LastPlayedColumn = UI.GuiColumns.LastPlayedColumn,
|
||||
FileExtColumn = UI.GuiColumns.FileExtColumn,
|
||||
@@ -136,6 +137,9 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
PreferredGpu = Graphics.PreferredGpu,
|
||||
MultiplayerLanInterfaceId = Multiplayer.LanInterfaceId,
|
||||
MultiplayerMode = Multiplayer.Mode,
|
||||
MultiplayerDisableP2p = Multiplayer.DisableP2p,
|
||||
MultiplayerLdnPassphrase = Multiplayer.LdnPassphrase,
|
||||
LdnServer = Multiplayer.LdnServer,
|
||||
};
|
||||
|
||||
return configurationFile;
|
||||
@@ -195,6 +199,9 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
System.UseHypervisor.Value = true;
|
||||
Multiplayer.LanInterfaceId.Value = "0";
|
||||
Multiplayer.Mode.Value = MultiplayerMode.Disabled;
|
||||
Multiplayer.DisableP2p.Value = false;
|
||||
Multiplayer.LdnPassphrase.Value = "";
|
||||
Multiplayer.LdnServer.Value = "";
|
||||
UI.GuiColumns.FavColumn.Value = true;
|
||||
UI.GuiColumns.IconColumn.Value = true;
|
||||
UI.GuiColumns.AppColumn.Value = true;
|
||||
@@ -307,5 +314,5 @@ namespace Ryujinx.UI.Common.Configuration
|
||||
|
||||
return GraphicsBackend.OpenGl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Ryujinx.UI.Common.Configuration.UI
|
||||
public bool AppColumn { get; set; }
|
||||
public bool DevColumn { get; set; }
|
||||
public bool VersionColumn { get; set; }
|
||||
public bool LdnInfoColumn { get; set; }
|
||||
public bool TimePlayedColumn { get; set; }
|
||||
public bool LastPlayedColumn { get; set; }
|
||||
public bool FileExtColumn { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user