aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/AppHost.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Ava/AppHost.cs')
-rw-r--r--Ryujinx.Ava/AppHost.cs23
1 files changed, 6 insertions, 17 deletions
diff --git a/Ryujinx.Ava/AppHost.cs b/Ryujinx.Ava/AppHost.cs
index 09163bd6..1a6ba024 100644
--- a/Ryujinx.Ava/AppHost.cs
+++ b/Ryujinx.Ava/AppHost.cs
@@ -57,7 +57,7 @@ namespace Ryujinx.Ava
private static readonly Cursor InvisibleCursor = new Cursor(StandardCursorType.None);
private readonly AccountManager _accountManager;
- private UserChannelPersistence _userChannelPersistence;
+ private readonly UserChannelPersistence _userChannelPersistence;
private readonly InputManager _inputManager;
@@ -82,7 +82,6 @@ namespace Ryujinx.Ava
private bool _dialogShown;
private WindowsMultimediaTimerResolution _windowsMultimediaTimerResolution;
- private KeyboardStateSnapshot _lastKeyboardSnapshot;
private readonly CancellationTokenSource _gpuCancellationTokenSource;
@@ -126,7 +125,6 @@ namespace Ryujinx.Ava
_glLogLevel = ConfigurationState.Instance.Logger.GraphicsDebugLevel;
_inputManager.SetMouseDriver(new AvaloniaMouseDriver(renderer));
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
- _lastKeyboardSnapshot = _keyboardInterface.GetKeyboardStateSnapshot();
NpadManager = _inputManager.CreateNpadManager();
TouchScreenManager = _inputManager.CreateTouchScreenManager();
@@ -722,9 +720,7 @@ namespace Ryujinx.Ava
}
}
- var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value
- ? HLE.MemoryConfiguration.MemoryConfiguration6GB
- : HLE.MemoryConfiguration.MemoryConfiguration4GB;
+ var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value ? HLE.MemoryConfiguration.MemoryConfiguration6GB : HLE.MemoryConfiguration.MemoryConfiguration4GB;
IntegrityCheckLevel fsIntegrityCheckLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks ? IntegrityCheckLevel.ErrorOnInvalid : IntegrityCheckLevel.None;
@@ -898,7 +894,7 @@ namespace Ryujinx.Ava
}
}
- private void HandleScreenState(KeyboardStateSnapshot keyboard, KeyboardStateSnapshot lastKeyboard)
+ private void HandleScreenState()
{
if (ConfigurationState.Instance.Hid.EnableMouse)
{
@@ -935,19 +931,12 @@ namespace Ryujinx.Ava
{
Dispatcher.UIThread.Post(() =>
{
- KeyboardStateSnapshot keyboard = _keyboardInterface.GetKeyboardStateSnapshot();
+ HandleScreenState();
- HandleScreenState(keyboard, _lastKeyboardSnapshot);
-
- if (keyboard.IsPressed(Key.Delete))
+ if (_keyboardInterface.GetKeyboardStateSnapshot().IsPressed(Key.Delete) && _parent.WindowState != WindowState.FullScreen)
{
- if (_parent.WindowState != WindowState.FullScreen)
- {
- Ptc.Continue();
- }
+ Ptc.Continue();
}
-
- _lastKeyboardSnapshot = keyboard;
});
}