Skip to content

Commit

Permalink
🛠️ Stream Deck: Reduce the maximum idle delay in line with official s…
Browse files Browse the repository at this point in the history
…oftware.

Purely for UI reasons.
  • Loading branch information
hexawyz committed Jan 13, 2025
1 parent 2d6a21e commit 0d048d7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ public override async ValueTask DisposeAsync()

string IDeviceSerialNumberFeature.SerialNumber => ConfigurationKey.UniqueId!;

// Elgato Stream Deck actually only allows setting the delay up to two hours, but we can reasonably do a bit more. (As the device is not battery powered anyway)
TimeSpan IIdleSleepTimerFeature.MaximumIdleTime => TimeSpan.FromTicks(8 * TimeSpan.TicksPerHour);
// Elgato Stream Deck actually only allows setting the delay up to two hours, but the device can do much more.
// The maximum we can set here will thus always be arbitrary, but for now, setting values that are too big will make the UI unusable or even break it. (Broken for uint.MaxValue)
TimeSpan IIdleSleepTimerFeature.MaximumIdleTime => TimeSpan.FromTicks(2 * TimeSpan.TicksPerHour);
TimeSpan IIdleSleepTimerFeature.IdleTime => TimeSpan.FromTicks(_idleSleepDelay * TimeSpan.TicksPerSecond);

async Task IIdleSleepTimerFeature.SetIdleTimeAsync(TimeSpan idleTime, CancellationToken cancellationToken)
Expand Down

0 comments on commit 0d048d7

Please sign in to comment.