Fix a bug where the step size starts at 0 instead of 1
This commit is contained in:
parent
f94052e54b
commit
d89c8b1ffa
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user