mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Variable DPI Increment as some mice do not use 50 per step but 100.
This commit is contained in:
@@ -376,9 +376,11 @@ namespace GHelper
|
||||
|
||||
sliderDPI.Max = mouse.MaxDPI();
|
||||
sliderDPI.Min = mouse.MinDPI();
|
||||
sliderDPI.Step = mouse.DPIIncrements();
|
||||
|
||||
numericUpDownCurrentDPI.Minimum = mouse.MinDPI();
|
||||
numericUpDownCurrentDPI.Maximum = mouse.MaxDPI();
|
||||
numericUpDownCurrentDPI.Increment = mouse.DPIIncrements();
|
||||
|
||||
|
||||
if (!mouse.HasDPIColors())
|
||||
|
||||
@@ -700,6 +700,11 @@ namespace GHelper.Peripherals.Mouse
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual int DPIIncrements()
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
public virtual bool CanChangeDPIProfile()
|
||||
{
|
||||
return DPIProfileCount() > 1;
|
||||
@@ -763,7 +768,7 @@ namespace GHelper.Peripherals.Mouse
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ushort dpiEncoded = (ushort)((dpi.DPI - 50) / 50);
|
||||
ushort dpiEncoded = (ushort)((dpi.DPI - DPIIncrements()) / DPIIncrements());
|
||||
|
||||
if (HasDPIColors())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user