Merge pull request #7816 from JosJuice/titledatabase-edge-cases

Fix edge cases in TitleDatabase, cover downloading, Gecko code downloading
This commit is contained in:
Tilka
2019-02-26 04:25:45 +00:00
committed by GitHub
24 changed files with 189 additions and 210 deletions

View File

@ -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()

View File

@ -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
}
}
}
}

View File

@ -123,6 +123,12 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getGameI
return ToJString(env, GetRef(env, obj)->GetGameID());
}
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getGameTdbId(JNIEnv* env,
jobject obj)
{
return ToJString(env, GetRef(env, obj)->GetGameTDBID());
}
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getDiscNumber(JNIEnv* env,
jobject obj)
{