From 1e5c4fedbdb459259080c5bfd84438b84936ea42 Mon Sep 17 00:00:00 2001 From: Babib3l Date: Wed, 18 Mar 2026 21:55:50 +0100 Subject: [PATCH] Fix Build error --- src/Ryujinx.Input.SDL3/SDL3Keyboard.cs | 1 + src/Ryujinx/Input/AvaloniaKeyboard.cs | 1 + src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Input.SDL3/SDL3Keyboard.cs b/src/Ryujinx.Input.SDL3/SDL3Keyboard.cs index 3e64f3447..d72b31c20 100644 --- a/src/Ryujinx.Input.SDL3/SDL3Keyboard.cs +++ b/src/Ryujinx.Input.SDL3/SDL3Keyboard.cs @@ -3,6 +3,7 @@ using Ryujinx.Common.Configuration.Hid.Keyboard; using Ryujinx.Common.Logging; using System; using System.Collections.Generic; +using System.Numerics; using System.Runtime.CompilerServices; using System.Threading; using SDL; diff --git a/src/Ryujinx/Input/AvaloniaKeyboard.cs b/src/Ryujinx/Input/AvaloniaKeyboard.cs index 526ec7981..198c60971 100644 --- a/src/Ryujinx/Input/AvaloniaKeyboard.cs +++ b/src/Ryujinx/Input/AvaloniaKeyboard.cs @@ -4,6 +4,7 @@ using Ryujinx.Common.Logging; using Ryujinx.Input; using System; using System.Collections.Generic; +using System.Numerics; using System.Threading; using Key = Ryujinx.Input.Key; diff --git a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs index 7e8151150..43ebef6f4 100644 --- a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs @@ -290,8 +290,9 @@ namespace Ryujinx.Ava.UI.ViewModels.Input { _mainWindow = RyujinxApp.MainWindow; - AvaloniaKeyboardDriver = new AvaloniaKeyboardDriver(owner, KeyboardInputMode.Physical); - AvaloniaKeyboardDriver.KeyPressed += PhysicalKeyLabelHelper.ObserveKeyPress; + AvaloniaKeyboardDriver keyboardDriver = new(owner, KeyboardInputMode.Physical); + keyboardDriver.KeyPressed += PhysicalKeyLabelHelper.ObserveKeyPress; + AvaloniaKeyboardDriver = keyboardDriver; _mainWindow.InputManager.GamepadDriver.OnGamepadConnected += HandleOnGamepadConnected; _mainWindow.InputManager.GamepadDriver.OnGamepadDisconnected += HandleOnGamepadDisconnected;