summaryrefslogtreecommitdiff
path: root/grapher/Models/Serialized
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-10-08 19:44:40 -0700
committerJacob Palecki <[email protected]>2020-10-08 19:44:40 -0700
commit0039d6e84d4e05e842542ad021a9c21e619c69c2 (patch)
tree2cbfa795c4e794dbdcbe364d2a93159fabd84e23 /grapher/Models/Serialized
parentrename sensitivity field to 'sens multiplier' (diff)
downloadrawaccel-0039d6e84d4e05e842542ad021a9c21e619c69c2.tar.xz
rawaccel-0039d6e84d4e05e842542ad021a9c21e619c69c2.zip
Follow full C# convention
Diffstat (limited to 'grapher/Models/Serialized')
-rw-r--r--grapher/Models/Serialized/GUISettings.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/grapher/Models/Serialized/GUISettings.cs b/grapher/Models/Serialized/GUISettings.cs
index f9e5755..c8f87ae 100644
--- a/grapher/Models/Serialized/GUISettings.cs
+++ b/grapher/Models/Serialized/GUISettings.cs
@@ -31,7 +31,19 @@ namespace grapher.Models.Serialized
#region Methods
- public bool ValueEquals(GUISettings other)
+ public override bool Equals(object obj)
+ {
+ var other = obj as GUISettings;
+
+ if (other == null)
+ {
+ return false;
+ }
+
+ return Equals(other);
+ }
+
+ public bool Equals(GUISettings other)
{
return DPI == other.DPI &&
PollRate == other.PollRate &&
@@ -39,6 +51,14 @@ namespace grapher.Models.Serialized
ShowVelocityAndGain == other.ShowVelocityAndGain;
}
+ public override int GetHashCode()
+ {
+ return DPI.GetHashCode() ^
+ PollRate.GetHashCode() ^
+ ShowLastMouseMove.GetHashCode() ^
+ ShowVelocityAndGain.GetHashCode();
+ }
+
#endregion Methods
}
}