summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2019-02-23 17:49:06 +0100
committerJosJuice <josjuice@gmail.com>2019-02-25 19:54:25 +0100
commit8842a0f402ffe60a80ce7894bfd36afd039009fc (patch)
tree63b17123d1238eeca41754711dd186a3c48689cc /Source/Android/app/src/main/java
parentd27036eb77a7cde0beea1760773dfd046dd2ca10 (diff)
Keep track of GameTDB ID separately from game ID
The difference between Dolphin's game IDs and GameTDB's game IDs is that GameTDB uses four characters for non-disc titles, whereas Dolphin uses six characters for all titles. This fixes: - TitleDatabase considering Datel discs to be NHL Hitz 2002 - Gecko code downloading not working for discs with IDs starting with P - Cover downloading mixing up discs with channels (e.g. Mario Kart Wii and Mario Kart Channel) and making extra HTTP requests. (Android was actually doing a better job at this than DolphinQt!)
Diffstat (limited to 'Source/Android/app/src/main/java')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java4
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/CoverHelper.java7
2 files changed, 5 insertions, 6 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java
index 45d0eb9060..5a247137ab 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameFile.java
@@ -30,6 +30,8 @@ public class GameFile
public native String getGameId();
+ public native String getGameTdbId();
+
public native int getDiscNumber();
public native int getRevision();
@@ -43,7 +45,7 @@ public class GameFile
public String getCoverPath()
{
return Environment.getExternalStorageDirectory().getPath() +
- "/dolphin-emu/Cache/GameCovers/" + getGameId() + ".png";
+ "/dolphin-emu/Cache/GameCovers/" + getGameTdbId() + ".png";
}
public String getCustomCoverPath()
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/CoverHelper.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/CoverHelper.java
index a6184e8681..2c0cd393a0 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/CoverHelper.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/CoverHelper.java
@@ -12,10 +12,7 @@ public final class CoverHelper
public static String buildGameTDBUrl(GameFile game, String region)
{
- String gameId = game.getGameId();
- if (game.getPlatform() == 2) // WiiWare
- gameId = gameId.substring(0, 4);
- return String.format(baseUrl, region, gameId);
+ return String.format(baseUrl, region, game.getGameTdbId());
}
public static String getRegion(GameFile game)
@@ -77,4 +74,4 @@ public final class CoverHelper
// Do nothing
}
}
-} \ No newline at end of file
+}