mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-10 03:02:05 -10:00
Also fixes DX11.0 support (for Win7 PCs that aren't fully updated), which stopped working after the recent variable refresh rate changes
44 lines
852 B
C#
44 lines
852 B
C#
using Avalonia;
|
|
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.Markup.Xaml;
|
|
using Avalonia.Threading;
|
|
using Mesen.Config;
|
|
using Mesen.Interop;
|
|
using Mesen.ViewModels;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Mesen.Windows
|
|
{
|
|
public class NetplayConnectWindow : MesenWindow
|
|
{
|
|
public NetplayConnectWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
AvaloniaXamlLoader.Load(this);
|
|
}
|
|
|
|
private void Ok_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
NetplayConfig cfg = (NetplayConfig)DataContext!;
|
|
ConfigManager.Config.Netplay = cfg.Clone();
|
|
|
|
Close(true);
|
|
|
|
Task.Run(() => {
|
|
NetplayApi.Connect(cfg.Host, cfg.Port, cfg.Password, false);
|
|
});
|
|
}
|
|
|
|
private void Cancel_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
Close(false);
|
|
}
|
|
}
|
|
}
|