Fix volume/brightness by 5

This commit is contained in:
Kamil Trzciński 2022-11-18 15:56:44 +01:00
parent aac4810c05
commit b672c4e9c3
4 changed files with 9 additions and 9 deletions

View file

@ -42,9 +42,9 @@ namespace PowerControl.Helpers
}
}
public static int GetMasterVolume10()
public static int GetMasterVolume(double roundValue)
{
return (int)(Math.Round(GetMasterVolume() / 10.0) * 10.0);
return (int)(Math.Round(GetMasterVolume() / roundValue) * roundValue);
}
/// <summary>

View file

@ -23,9 +23,9 @@ namespace PowerControl.Helpers
return -1;
}
public static int Get10()
public static int Get(double roundValue = 10.0)
{
return (int)(Math.Round(Get() / 10.0) * 10.0);
return (int)(Math.Round(Get() / roundValue) * roundValue);
}
public static void Set(int brightness)