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.
30 lines
765 B
C#
30 lines
765 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
using System;
|
|
|
|
namespace Ryujinx.Ava.UI.Views.Settings
|
|
{
|
|
public partial class SettingsNetworkView : UserControl
|
|
{
|
|
public SettingsViewModel ViewModel;
|
|
|
|
public SettingsNetworkView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void GenLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
byte[] code = new byte[4];
|
|
new Random().NextBytes(code);
|
|
ViewModel.LdnPassphrase = $"Ryujinx-{BitConverter.ToUInt32(code):x8}";
|
|
}
|
|
|
|
private void ClearLdnPassButton_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
ViewModel.LdnPassphrase = "";
|
|
}
|
|
}
|
|
}
|