From 7bc4971cf948b506f125ae29fd581795ccb3a10d Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 15 May 2022 16:02:15 +0200 Subject: [PATCH] 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 --- .../Ryujinx.Audio.Backends.OpenAL.csproj | 2 +- Ryujinx.Ava/Input/AvaloniaKeyboardDriver.cs | 8 +- Ryujinx.Ava/Ryujinx.Ava.csproj | 281 +++++++++--------- .../Applet/AvaloniaDynamicTextInputHandler.cs | 15 +- Ryujinx.Graphics.OpenGL/Pipeline.cs | 2 +- .../Ryujinx.Graphics.OpenGL.csproj | 2 +- Ryujinx/Ryujinx.csproj | 31 +- 7 files changed, 172 insertions(+), 169 deletions(-) diff --git a/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj b/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj index fd648715a..f1e783e6e 100644 --- a/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj +++ b/Ryujinx.Audio.Backends.OpenAL/Ryujinx.Audio.Backends.OpenAL.csproj @@ -5,7 +5,7 @@ - + diff --git a/Ryujinx.Ava/Input/AvaloniaKeyboardDriver.cs b/Ryujinx.Ava/Input/AvaloniaKeyboardDriver.cs index 3babfe9df..1177e67a1 100644 --- a/Ryujinx.Ava/Input/AvaloniaKeyboardDriver.cs +++ b/Ryujinx.Ava/Input/AvaloniaKeyboardDriver.cs @@ -4,11 +4,9 @@ using Ryujinx.Ava.Common.Locale; using Ryujinx.Input; using System; using System.Collections.Generic; -using System.Linq; using AvaKey = Avalonia.Input.Key; using Key = Ryujinx.Input.Key; -using TextInputEventArgs = OpenTK.Windowing.Common.TextInputEventArgs; namespace Ryujinx.Ava.Input { @@ -20,7 +18,7 @@ namespace Ryujinx.Ava.Input public event EventHandler KeyPressed; public event EventHandler KeyRelease; - public event EventHandler TextInput; + public event EventHandler TextInput; public string DriverName => "Avalonia"; @@ -36,9 +34,9 @@ namespace Ryujinx.Ava.Input _control.TextInput += Control_TextInput; } - private void Control_TextInput(object sender, Avalonia.Input.TextInputEventArgs e) + private void Control_TextInput(object sender, TextInputEventArgs e) { - TextInput?.Invoke(this, new TextInputEventArgs(e.Text.First())); + TextInput?.Invoke(this, e.Text); } public event Action OnGamepadConnected diff --git a/Ryujinx.Ava/Ryujinx.Ava.csproj b/Ryujinx.Ava/Ryujinx.Ava.csproj index f966f646e..e5b7904d7 100644 --- a/Ryujinx.Ava/Ryujinx.Ava.csproj +++ b/Ryujinx.Ava/Ryujinx.Ava.csproj @@ -1,141 +1,144 @@  - - net6.0 - win-x64;osx-x64;linux-x64 - Exe - true - 1.0.0-dirty - Ryujinx.Ava - Ryujinx.ico - - - true - true - - - true - - - true - - - - Always - alsoft.ini - - - Always - THIRDPARTY.md - - - Always - LICENSE-Ryujinx.Audio.txt - - - - true - true - - - - Designer - - - - - - - - - - - - MSBuild:Compile - - - MSBuild:Compile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - App.axaml - Code - - - MainWindow.axaml - Code - - - AboutWindow.axaml - Code - - - ProfileWindow.axaml - Code - - - ProfileWindow.axaml - Code - - - InputDialog.axaml - Code - - - ContentDialogOverlay.xaml - - - GameListView.axaml - Code - - + + net6.0 + win-x64;osx-x64;linux-x64 + Exe + true + 1.0.0-dirty + false + false + $(DefineConstants);$(ExtraDefineConstants) + Ryujinx.Ava + Ryujinx.ico + + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + alsoft.ini + + + Always + THIRDPARTY.md + + + Always + LICENSE-Ryujinx.Audio.txt + + + + + + Designer + + + + MSBuild:Compile + + + MSBuild:Compile + + + + + App.axaml + Code + + + MainWindow.axaml + Code + + + AboutWindow.axaml + Code + + + ProfileWindow.axaml + Code + + + ProfileWindow.axaml + Code + + + InputDialog.axaml + Code + + + ContentDialogOverlay.xaml + + + GameListView.axaml + Code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs b/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs index 714b63607..294e89654 100644 --- a/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs +++ b/Ryujinx.Ava/Ui/Applet/AvaloniaDynamicTextInputHandler.cs @@ -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)) { diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index 0326f9809..ced41d48f 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -677,7 +677,7 @@ namespace Ryujinx.Graphics.OpenGL GL.MultiDrawElementsIndirectCount( _primitiveType, - (Version46)_elementsType, + (All)_elementsType, (IntPtr)indirectBuffer.Offset, (IntPtr)parameterBuffer.Offset, maxDrawCount, diff --git a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj index 3f4bcdee4..d84ab2368 100644 --- a/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj +++ b/Ryujinx.Graphics.OpenGL/Ryujinx.Graphics.OpenGL.csproj @@ -6,7 +6,7 @@ - + diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj index 7bbc1ca96..31da7d20a 100644 --- a/Ryujinx/Ryujinx.csproj +++ b/Ryujinx/Ryujinx.csproj @@ -23,9 +23,10 @@ - + + @@ -42,20 +43,20 @@ - - - Always - alsoft.ini - - - Always - THIRDPARTY.md - - - Always - LICENSE-Ryujinx.Audio.txt - - + + + Always + alsoft.ini + + + Always + THIRDPARTY.md + + + Always + LICENSE-Ryujinx.Audio.txt + +