mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-21 06:03:52 +00:00
Introduce inheritable Profiles and Managers
- There's always a single Profile choosen - There are many Managers changing settings depending on environment - Improve and re-use mappings between profiles - Introduce Steam Profile to be used when in Steam Big Picture or Steam Game
This commit is contained in:
parent
10d6c055da
commit
ab5bc370df
21 changed files with 530 additions and 311 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using CommonHelpers;
|
||||
using hidapi;
|
||||
using PowerControl.External;
|
||||
using static CommonHelpers.Log;
|
||||
|
|
@ -36,21 +37,33 @@ namespace SteamController.Devices
|
|||
private void BeforeUpdate(byte[] buffer)
|
||||
{
|
||||
foreach (var action in AllActions)
|
||||
action.BeforeUpdate(buffer, this);
|
||||
action.BeforeUpdate(buffer);
|
||||
}
|
||||
|
||||
internal void BeforeUpdate()
|
||||
{
|
||||
byte[] data = neptuneDevice.Read(ReadTimeout);
|
||||
if (data == null)
|
||||
LizardButtons = true;
|
||||
LizardMouse = true;
|
||||
|
||||
try
|
||||
{
|
||||
byte[] data = neptuneDevice.Read(ReadTimeout);
|
||||
if (data == null)
|
||||
{
|
||||
Reset();
|
||||
Updated = false;
|
||||
return;
|
||||
}
|
||||
|
||||
BeforeUpdate(data);
|
||||
Updated = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.TraceLine("STEAM: Exception: {0}", e);
|
||||
Reset();
|
||||
Updated = false;
|
||||
return;
|
||||
}
|
||||
|
||||
BeforeUpdate(data);
|
||||
Updated = true;
|
||||
}
|
||||
|
||||
internal void Update()
|
||||
|
|
@ -58,8 +71,17 @@ namespace SteamController.Devices
|
|||
foreach (var action in AllActions)
|
||||
action.Update();
|
||||
|
||||
UpdateLizardButtons();
|
||||
UpdateLizardMouse();
|
||||
try
|
||||
{
|
||||
UpdateLizardButtons();
|
||||
UpdateLizardMouse();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.TraceLine("STEAM: Exception: {0}", e);
|
||||
Reset();
|
||||
Updated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue