UI: Fix diaglog popups doubling the window controls and laying text over the menu bar.

This commit is contained in:
Evan Husted 2024-10-17 11:51:40 -05:00
parent 045f9a39bb
commit 430073817c
21 changed files with 75 additions and 60 deletions

View file

@ -244,7 +244,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
_mainWindow.InputManager.GamepadDriver.OnGamepadConnected += HandleOnGamepadConnected;
_mainWindow.InputManager.GamepadDriver.OnGamepadDisconnected += HandleOnGamepadDisconnected;
MainWindow.ViewModel.AppHost?.NpadManager.BlockInputUpdates();
_mainWindow.ViewModel.AppHost?.NpadManager.BlockInputUpdates();
_isLoaded = false;
@ -357,18 +357,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
private void HandleOnGamepadDisconnected(string id)
{
Dispatcher.UIThread.Post(() =>
{
LoadDevices();
});
Dispatcher.UIThread.Post(LoadDevices);
}
private void HandleOnGamepadConnected(string id)
{
Dispatcher.UIThread.Post(() =>
{
LoadDevices();
});
Dispatcher.UIThread.Post(LoadDevices);
}
private string GetCurrentGamepadId()
@ -847,7 +841,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
}
}
MainWindow.ViewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse);
_mainWindow.ViewModel.AppHost?.NpadManager.ReloadConfiguration(newConfig, ConfigurationState.Instance.Hid.EnableKeyboard, ConfigurationState.Instance.Hid.EnableMouse);
// Atomically replace and signal input change.
// NOTE: Do not modify InputConfig.Value directly as other code depends on the on-change event.
@ -879,7 +873,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
_mainWindow.InputManager.GamepadDriver.OnGamepadConnected -= HandleOnGamepadConnected;
_mainWindow.InputManager.GamepadDriver.OnGamepadDisconnected -= HandleOnGamepadDisconnected;
MainWindow.ViewModel.AppHost?.NpadManager.UnblockInputUpdates();
_mainWindow.ViewModel.AppHost?.NpadManager.UnblockInputUpdates();
SelectedGamepad?.Dispose();