Saved/loaded update-rate into settings

This commit is contained in:
DarthAffe committed 2017-08-13 13:10:18 +02:00
1 parent fdf78e34b8
commit 472f0ddca7
2 files changed
+8 -4

No files matched your search

@@ -17,7 +17,9 @@ namespace KeyboardAudioVisualizer.UI
get => 1.0 / RGBSurface.Instance.UpdateFrequency;
set
{
RGBSurface.Instance.UpdateFrequency = 1.0 / MathHelper.Clamp(value, 1, 40);
double val = MathHelper.Clamp(value, 1, 40);
ApplicationManager.Instance.Settings.UpdateRate = val;
RGBSurface.Instance.UpdateFrequency = 1.0 / val;
OnPropertyChanged();
}
}