Fix a bug where the step size starts at 0 instead of 1

This commit is contained in:
dlprows 2023-09-24 14:59:52 -06:00
parent f94052e54b
commit d89c8b1ffa
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,11 @@ namespace FocusVolumeControl.AudioSessions
{ {
public static float GetAdjustedVolume(float startingVolume, int step, int ticks) public static float GetAdjustedVolume(float startingVolume, int step, int ticks)
{ {
if(step <= 0)
{
step = 1;
}
var level = startingVolume; var level = startingVolume;
level += 0.01f * step * ticks; level += 0.01f * step * ticks;

View File

@ -26,6 +26,7 @@ public class DialAction : EncoderBase
{ {
PluginSettings instance = new PluginSettings(); PluginSettings instance = new PluginSettings();
instance.FallbackBehavior = FallbackBehavior.SystemSounds; instance.FallbackBehavior = FallbackBehavior.SystemSounds;
instance.StepSize = 1;
return instance; return instance;
} }
} }