summaryrefslogtreecommitdiffstats
path: root/src/android/app
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-12 23:45:18 +0200
committerGitHub <noreply@github.com>2023-06-12 23:45:18 +0200
commit5144ca8bb6f27f29ea3c660456baa7feeaf08ea9 (patch)
tree18281d3c50bdb101775d81531f0f47fde19e8848 /src/android/app
parentMerge pull request #10724 from t895/auto-version-property (diff)
parentandroid: Use autogenerated hash code function for Game class (diff)
downloadyuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.gz
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.bz2
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.lz
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.xz
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.tar.zst
yuzu-5144ca8bb6f27f29ea3c660456baa7feeaf08ea9.zip
Diffstat (limited to 'src/android/app')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt
index 3d6782c49..35d8000c5 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt
@@ -26,13 +26,18 @@ class Game(
if (other !is Game)
return false
- return title == other.title
- && description == other.description
- && regions == other.regions
- && path == other.path
- && gameId == other.gameId
- && company == other.company
- && isHomebrew == other.isHomebrew
+ return hashCode() == other.hashCode()
+ }
+
+ override fun hashCode(): Int {
+ var result = title.hashCode()
+ result = 31 * result + description.hashCode()
+ result = 31 * result + regions.hashCode()
+ result = 31 * result + path.hashCode()
+ result = 31 * result + gameId.hashCode()
+ result = 31 * result + company.hashCode()
+ result = 31 * result + isHomebrew.hashCode()
+ return result
}
companion object {