Detect SAS (Secure Attention Sequence) in a way that does not prevent screen sleep

This commit is contained in:
Kamil Trzciński 2022-12-10 10:18:21 +01:00
parent 2db4dcf5ae
commit fec7e87c21
7 changed files with 26 additions and 39 deletions

View file

@ -28,17 +28,18 @@ namespace SteamController.Profiles
return Status.Done;
}
if (!c.Mouse.Valid)
if (!c.KeyboardMouseValid)
{
// Failed to acquire secure context
// Enable emergency Lizard
c.Steam.LizardButtons = true;
c.Steam.LizardMouse = true;
return Status.Done;
}
c.Steam.LizardButtons = SteamModeLizardButtons;
c.Steam.LizardMouse = SteamModeLizardMouse;
else
{
c.Steam.LizardButtons = SteamModeLizardButtons;
c.Steam.LizardMouse = SteamModeLizardMouse;
}
EmulateScrollOnLPad(c);
EmulateScrollOnLStick(c);

View file

@ -6,7 +6,7 @@ namespace SteamController.Profiles
{
public override bool Selected(Context context)
{
return context.Enabled && context.X360.Valid && context.Mouse.Valid && !context.State.SteamUsesSteamInput;
return context.Enabled && context.X360.Valid && context.KeyboardMouseValid && !context.State.SteamUsesSteamInput;
}
internal override ProfilesSettings.BackPanelSettings BackPanelSettings