mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
SteamController: Fix STEAM+DPadUp not working
This commit is contained in:
parent
99369f24e4
commit
9571e4fc1f
|
|
@ -25,3 +25,4 @@
|
|||
- Fix Steam Game detection when in X360 controller mode
|
||||
- Hold-press Guide button for 100ms in X360 mode
|
||||
- Avoid deadlock when changing profile
|
||||
- SteamController: Fix `STEAM+DPadUp` not working
|
||||
|
|
|
|||
|
|
@ -10,24 +10,11 @@ namespace SteamController.Profiles.Default
|
|||
public readonly TimeSpan HoldForKill = TimeSpan.FromSeconds(3);
|
||||
public readonly TimeSpan HoldForClose = TimeSpan.FromSeconds(1);
|
||||
|
||||
public override Status Run(Context c)
|
||||
protected override bool SteamShortcuts(Context c)
|
||||
{
|
||||
if (base.Run(c).IsDone)
|
||||
{
|
||||
return Status.Done;
|
||||
}
|
||||
if (base.SteamShortcuts(c))
|
||||
return true;
|
||||
|
||||
if (c.Steam.BtnSteam.Hold(HoldForShorcuts, ShortcutConsumed))
|
||||
{
|
||||
SteamShortcuts(c);
|
||||
return Status.Done;
|
||||
}
|
||||
|
||||
return Status.Continue;
|
||||
}
|
||||
|
||||
private void SteamShortcuts(Context c)
|
||||
{
|
||||
c.Steam.LizardButtons = SettingsDebug.Default.LizardButtons;
|
||||
c.Steam.LizardMouse = SettingsDebug.Default.LizardMouse;
|
||||
|
||||
|
|
@ -116,21 +103,14 @@ namespace SteamController.Profiles.Default
|
|||
{
|
||||
c.Keyboard.KeyPress(VirtualKeyCode.ESCAPE);
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool AdditionalShortcuts(Context c)
|
||||
{
|
||||
if (base.AdditionalShortcuts(c))
|
||||
return true;
|
||||
|
||||
// Additional binding for tool hotkeys (Lossless Fullscreen is nice)
|
||||
if (c.Steam.BtnDpadUp.Pressed())
|
||||
{
|
||||
c.Keyboard.KeyPress(new VirtualKeyCode[] { VirtualKeyCode.LCONTROL, VirtualKeyCode.LMENU }, VirtualKeyCode.VK_U);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void EmulateScrollOnLPad(Context c)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace SteamController.Profiles.Default
|
|||
|
||||
if (c.Steam.BtnSteam.Hold(HoldForShorcuts, ShortcutConsumed))
|
||||
{
|
||||
if (AdditionalShortcuts(c))
|
||||
if (SteamShortcuts(c))
|
||||
{
|
||||
return Status.Done;
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ namespace SteamController.Profiles.Default
|
|||
return Status.Continue;
|
||||
}
|
||||
|
||||
protected virtual bool AdditionalShortcuts(Context c)
|
||||
protected virtual bool SteamShortcuts(Context c)
|
||||
{
|
||||
if (c.Steam.BtnOptions.Pressed())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue