mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 08:56:24 +02:00
Overlay system
This commit is contained in:
parent
3be20385ed
commit
069a703f22
13 changed files with 1088 additions and 19 deletions
|
@ -1480,22 +1480,23 @@ namespace Ryujinx.Ava.Systems
|
|||
|
||||
private void ShowControllerOverlay(List<InputConfig> inputConfigs)
|
||||
{
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
try
|
||||
{
|
||||
try
|
||||
// Show overlay through the GPU context window directly
|
||||
if (Device?.Gpu?.Window != null)
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
int duration = ConfigurationState.Instance.ControllerOverlayInputCycleDuration.Value;
|
||||
Device.Gpu.Window.ShowControllerBindings(inputConfigs, duration);
|
||||
}
|
||||
catch (Exception ex)
|
||||
else
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, $"Failed to show controller overlay: {ex.Message}");
|
||||
Logger.Warning?.Print(LogClass.Application, "AppHost: Cannot show overlay - Device.Gpu.Window is null");
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, $"Failed to show controller overlay: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private KeyboardHotkeyState GetHotkeyState()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue