SteamController: Fix STEAM+DPadUp not working

This commit is contained in:
Kamil Trzciński 2023-01-10 16:42:00 +01:00
parent 6d69d8c395
commit 5a7ad0b766
3 changed files with 7 additions and 26 deletions

View file

@ -9,6 +9,7 @@
## 0.6.x
- SteamController: Fix `STEAM+DPadUp` not working
- PowerControl/SteamController: Improve RTSS detection to ignore processes not generating frames for over 5s
- PowerControl: Expose all in `GameProfiles`, and fix `GPU Scaling`, `Refresh Rate` and `FPS Limit` interwork
- PowerControl: Add `GameProfiles` allowing to persist per-game setttings for most of settings (Colors, Refresh Rate, FPS limit, etc.) [Thank you @maniman303 for https://github.com/ayufan/steam-deck-tools/pull/38]

View file

@ -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)

View file

@ -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())
{