UI: Fix diaglog popups doubling the window controls and laying text over the menu bar.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
private readonly string _amiiboJsonPath;
|
||||
private readonly byte[] _amiiboLogoBytes;
|
||||
private readonly HttpClient _httpClient;
|
||||
private readonly StyleableWindow _owner;
|
||||
private readonly StyleableAppWindow _owner;
|
||||
|
||||
private Bitmap _amiiboImage;
|
||||
private List<AmiiboApi> _amiiboList;
|
||||
@@ -49,7 +49,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
|
||||
private static readonly AmiiboJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions());
|
||||
|
||||
public AmiiboWindowViewModel(StyleableWindow owner, string lastScannedAmiiboId, string titleId)
|
||||
public AmiiboWindowViewModel(StyleableAppWindow owner, string lastScannedAmiiboId, string titleId)
|
||||
{
|
||||
_owner = owner;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user