summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/model/Game.kt14
1 files changed, 14 insertions, 0 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 c5cde9d05..2a17653b2 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
@@ -5,9 +5,11 @@ package org.yuzu.yuzu_emu.model
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
+import kotlinx.serialization.Serializable
import java.util.HashSet
@Parcelize
+@Serializable
class Game(
val title: String,
val description: String,
@@ -19,6 +21,18 @@ class Game(
val keyAddedToLibraryTime get() = "${gameId}_AddedToLibraryTime"
val keyLastPlayedTime get() = "${gameId}_LastPlayed"
+ override fun equals(other: Any?): Boolean {
+ 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
+ }
+
companion object {
val extensions: Set<String> = HashSet(
listOf(".xci", ".nsp", ".nca", ".nro")