Controller overlay changed from Window to UserControl

This commit is contained in:
Barış Hamil 2025-06-20 18:32:17 +03:00
parent 7e40ca3d92
commit b36165bdf8
5 changed files with 45 additions and 58 deletions

View file

@ -1484,9 +1484,12 @@ namespace Ryujinx.Ava.Systems
{
try
{
var overlayWindow = new UI.Windows.ControllerOverlayWindow(_topLevel as Avalonia.Controls.Window);
overlayWindow.ShowControllerBindings(inputConfigs);
overlayWindow.Show();
// Access the overlay through the MainWindow via the ViewModel
if (_viewModel?.Window?.ControllerOverlay != null)
{
int duration = ConfigurationState.Instance.ControllerOverlayInputCycleDuration.Value;
_viewModel.Window.ControllerOverlay.ShowControllerBindings(inputConfigs, duration);
}
}
catch (Exception ex)
{