mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 06:46:24 +02:00
Overlay system
This commit is contained in:
parent
bfd715b607
commit
ba250df73d
13 changed files with 1088 additions and 19 deletions
|
@ -1707,11 +1707,22 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
? ConfigurationState.InstanceExtra.Hid.InputConfig.Value
|
||||
: ConfigurationState.Instance.Hid.InputConfig.Value;
|
||||
|
||||
// Only show overlay if there are actual controller configurations for players 1-4
|
||||
if (inputConfigs?.Any(c => c.PlayerIndex <= PlayerIndex.Player4) == true)
|
||||
// Debug: Log what we're getting
|
||||
Logger.Info?.Print(LogClass.UI, $"MainWindowViewModel: Found {inputConfigs?.Count ?? 0} input configs");
|
||||
if (inputConfigs != null)
|
||||
{
|
||||
int duration = ConfigurationState.Instance.ControllerOverlayGameStartDuration.Value;
|
||||
Window.ControllerOverlay.ShowControllerBindings(inputConfigs, duration);
|
||||
foreach (var config in inputConfigs)
|
||||
{
|
||||
Logger.Info?.Print(LogClass.UI, $" Config: Player {config.PlayerIndex}, Backend {config.Backend}, Name '{config.Name}', Type {config.ControllerType}");
|
||||
}
|
||||
}
|
||||
|
||||
// Always show overlay - if no configs, it will show test data
|
||||
int duration = ConfigurationState.Instance.ControllerOverlayGameStartDuration.Value;
|
||||
// Show overlay through the GPU context window directly
|
||||
if (AppHost?.Device?.Gpu?.Window != null)
|
||||
{
|
||||
AppHost.Device.Gpu.Window.ShowControllerBindings(inputConfigs, duration);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue