misc: Clean up of CS project after Avalonia merge (#3340)

This reformat Avalonia csproj file, remove unused deps and reajust
Ryujinx csproj a bit after some other changes

Also updated OpenTK.Graphics
This commit is contained in:
Mary 2022-05-15 16:02:15 +02:00 committed by GitHub
parent 3551c18902
commit 7bc4971cf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 172 additions and 169 deletions

View file

@ -1,15 +1,16 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Threading;
using OpenTK.Windowing.Common;
using Ryujinx.Ava.Input;
using Ryujinx.Ava.Ui.Controls;
using Ryujinx.Ava.Ui.Windows;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.HLE.Ui;
using System;
using System.Threading;
using HidKey = Ryujinx.Common.Configuration.Hid.Key;
namespace Ryujinx.Ava.Ui.Applet
{
class AvaloniaDynamicTextInputHandler : IDynamicTextInputHandler
@ -54,20 +55,20 @@ namespace Ryujinx.Ava.Ui.Applet
TextChangedEvent?.Invoke(_hiddenTextBox.Text ?? string.Empty, _hiddenTextBox.SelectionStart, _hiddenTextBox.SelectionEnd, true);
}
private void AvaloniaDynamicTextInputHandler_TextInput(object sender, TextInputEventArgs e)
private void AvaloniaDynamicTextInputHandler_TextInput(object sender, string text)
{
Dispatcher.UIThread.InvokeAsync(() =>
{
if (_canProcessInput)
{
_hiddenTextBox.SendText(e.AsString);
_hiddenTextBox.SendText(text);
}
});
}
private void AvaloniaDynamicTextInputHandler_KeyRelease(object sender, Avalonia.Input.KeyEventArgs e)
{
var key = (Key)AvaloniaMappingHelper.ToInputKey(e.Key);
var key = (HidKey)AvaloniaMappingHelper.ToInputKey(e.Key);
if (!(KeyReleasedEvent?.Invoke(key)).GetValueOrDefault(true))
{
@ -85,9 +86,9 @@ namespace Ryujinx.Ava.Ui.Applet
});
}
private void AvaloniaDynamicTextInputHandler_KeyPressed(object sender, Avalonia.Input.KeyEventArgs e)
private void AvaloniaDynamicTextInputHandler_KeyPressed(object sender, KeyEventArgs e)
{
var key = (Key)AvaloniaMappingHelper.ToInputKey(e.Key);
var key = (HidKey)AvaloniaMappingHelper.ToInputKey(e.Key);
if (!(KeyPressedEvent?.Invoke(key)).GetValueOrDefault(true))
{