From 5b0c047e0bb9391883e33026798f9e401c8d911b Mon Sep 17 00:00:00 2001 From: Eder Bastos Date: Sat, 16 May 2015 20:52:55 -0400 Subject: [PATCH] Android: Remove inheritance from Game model, and improve the relevance of its content --- .../dolphinemu/dolphinemu/NativeLibrary.java | 6 +- .../activities/GameGridActivity.java | 14 +-- .../dolphinemu/adapters/GameAdapter.java | 4 +- .../dolphinemu/dialogs/GameDetailsDialog.java | 4 +- .../dolphinemu/model/FileListItem.java | 11 +- .../org/dolphinemu/dolphinemu/model/Game.java | 86 ++++++++++++++-- .../dolphinemu/dolphinemu/model/GcGame.java | 96 ------------------ .../dolphinemu/dolphinemu/model/WiiGame.java | 53 ---------- .../viewholders/GameViewHolder.java | 9 +- .../src/main/res/drawable-hdpi/ic_company.png | Bin 0 -> 288 bytes .../src/main/res/drawable-mdpi/ic_company.png | Bin 0 -> 255 bytes .../main/res/drawable-xhdpi/ic_company.png | Bin 0 -> 242 bytes .../main/res/drawable-xxhdpi/ic_company.png | Bin 0 -> 367 bytes .../main/res/drawable-xxxhdpi/ic_company.png | Bin 0 -> 411 bytes .../app/src/main/res/layout/card_game.xml | 4 +- .../main/res/layout/dialog_game_details.xml | 22 ++-- Source/Core/DolphinWX/MainAndroid.cpp | 74 ++++++++------ 17 files changed, 156 insertions(+), 227 deletions(-) delete mode 100644 Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GcGame.java delete mode 100644 Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/WiiGame.java create mode 100644 Source/Android/app/src/main/res/drawable-hdpi/ic_company.png create mode 100644 Source/Android/app/src/main/res/drawable-mdpi/ic_company.png create mode 100644 Source/Android/app/src/main/res/drawable-xhdpi/ic_company.png create mode 100644 Source/Android/app/src/main/res/drawable-xxhdpi/ic_company.png create mode 100644 Source/Android/app/src/main/res/drawable-xxxhdpi/ic_company.png diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java index 64463fe072..a47ff9c8ed 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java @@ -134,9 +134,11 @@ public final class NativeLibrary public static native String GetGameId(String filename); public static native int GetCountry(String filename); - public static native String GetDate(String filename); + + public static native String GetCompany(String filename); public static native long GetFilesize(String filename); - public static native boolean IsWiiTitle(String filename); + + public static native int GetPlatform(String filename); /** * Gets the Dolphin version string. diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/GameGridActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/GameGridActivity.java index be8c703fd6..e75affe126 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/GameGridActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/GameGridActivity.java @@ -179,12 +179,14 @@ public final class GameGridActivity extends Activity // Check that the file has an appropriate extension before trying to read out of it. if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.')))) { - GcGame game = new GcGame(NativeLibrary.GetTitle(entry.getAbsolutePath()), - NativeLibrary.GetDescription(entry.getAbsolutePath()).replace("\n", " "), - NativeLibrary.GetCountry(entry.getAbsolutePath()), - entry.getAbsolutePath(), - NativeLibrary.GetGameId(entry.getAbsolutePath()), - NativeLibrary.GetDate(entry.getAbsolutePath())); + String absolutePath = entry.getAbsolutePath(); + Game game = new Game(NativeLibrary.GetPlatform(absolutePath), + NativeLibrary.GetTitle(absolutePath), + NativeLibrary.GetDescription(absolutePath).replace("\n", " "), + NativeLibrary.GetCountry(absolutePath), + absolutePath, + NativeLibrary.GetGameId(absolutePath), + NativeLibrary.GetCompany(absolutePath)); gameList.add(game); } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java index 883107a410..d1debf63f6 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/adapters/GameAdapter.java @@ -79,9 +79,9 @@ public class GameAdapter extends RecyclerView.Adapter implements .into(holder.imageScreenshot); holder.textGameTitle.setText(game.getTitle()); - if (game.getDescription() != null) + if (game.getCompany() != null) { - holder.textDescription.setText(game.getDescription()); + holder.textCompany.setText(game.getCompany()); } holder.path = game.getPath(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java index b52a017278..d673da22c9 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/dialogs/GameDetailsDialog.java @@ -39,7 +39,7 @@ public class GameDetailsDialog extends DialogFragment arguments.putString(ARGUMENT_GAME_TITLE, game.getTitle()); arguments.putString(ARGUMENT_GAME_DESCRIPTION, game.getDescription()); arguments.putInt(ARGUMENT_GAME_COUNTRY, game.getCountry()); - arguments.putString(ARGUMENT_GAME_DATE, game.getDate()); + arguments.putString(ARGUMENT_GAME_DATE, game.getCompany()); arguments.putString(ARGUMENT_GAME_PATH, game.getPath()); arguments.putString(ARGUMENT_GAME_SCREENSHOT_PATH, game.getScreenPath()); fragment.setArguments(arguments); @@ -57,7 +57,7 @@ public class GameDetailsDialog extends DialogFragment CircleImageView circleBanner = (CircleImageView) contents.findViewById(R.id.circle_banner); TextView textTitle = (TextView) contents.findViewById(R.id.text_game_title); - TextView textDescription = (TextView) contents.findViewById(R.id.text_game_description); + TextView textDescription = (TextView) contents.findViewById(R.id.text_company); TextView textCountry = (TextView) contents.findViewById(R.id.text_country); TextView textDate = (TextView) contents.findViewById(R.id.text_date); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java index b9c8a571cf..4952412e9d 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java @@ -10,10 +10,11 @@ import java.util.Set; public class FileListItem implements Comparable { - public static final int TYPE_FOLDER = 0; - public static final int TYPE_GC = 1; - public static final int TYPE_WII = 2; - public static final int TYPE_OTHER = 3; + public static final int TYPE_GC = 0; + public static final int TYPE_WII = 1; + public static final int TYPE_WII_WARE = 2; + public static final int TYPE_OTHER = 4; + public static final int TYPE_FOLDER = 5; private int mType; private String mFilename; @@ -48,7 +49,7 @@ public class FileListItem implements Comparable // Check that the file has an extension we care about before trying to read out of it. if (allowedExtensions.contains(fileExtension)) { - mType = NativeLibrary.IsWiiTitle(mPath) ? TYPE_WII : TYPE_GC; + mType = NativeLibrary.GetPlatform(mPath); } else { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/Game.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/Game.java index b2ebb51d6f..4c4ea4fc04 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/Game.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/Game.java @@ -1,6 +1,8 @@ package org.dolphinemu.dolphinemu.model; -public interface Game +import java.io.File; + +public class Game { public static final int PLATFORM_GC = 0; public static final int PLATFORM_WII = 1; @@ -22,19 +24,85 @@ public interface Game public static final int COUNTRY_WORLD = 12; public static final int COUNTRY_UNKNOWN = 13; - public int getPlatform(); + private static final String PATH_SCREENSHOT_FOLDER = "file:///sdcard/dolphin-emu/ScreenShots/"; - public String getDate(); + private String mTitle; + private String mDescription; + private String mPath; + private String mGameId; + private String mScreenshotFolderPath; + private String mCompany; - public String getTitle(); + private int mPlatform; + private int mCountry; - public String getDescription(); + public Game(int platform, String title, String description, int country, String path, String gameId, String company) + { + mPlatform = platform; + mTitle = title; + mDescription = description; + mCountry = country; + mPath = path; + mGameId = gameId; + mCompany = company; + mScreenshotFolderPath = PATH_SCREENSHOT_FOLDER + getGameId() + "/"; + } - public int getCountry(); + public int getPlatform() + { + return mPlatform; + } - public String getPath(); + public String getTitle() + { + return mTitle; + } - public String getGameId(); + public String getDescription() + { + return mDescription; + } - public String getScreenPath(); + public String getCompany() + { + return mCompany; + } + + public int getCountry() + { + return mCountry; + } + + public String getPath() + { + return mPath; + } + + public String getGameId() + { + return mGameId; + } + + public String getScreenshotFolderPath() + { + return mScreenshotFolderPath; + } + + public String getScreenPath() + { + // Count how many screenshots are available, so we can use the most recent one. + File screenshotFolder = new File(mScreenshotFolderPath.substring(mScreenshotFolderPath.indexOf('s') - 1)); + int screenCount = 0; + + if (screenshotFolder.isDirectory()) + { + screenCount = screenshotFolder.list().length; + } + + String screenPath = mScreenshotFolderPath + + getGameId() + "-" + + screenCount + ".png"; + + return screenPath; + } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GcGame.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GcGame.java deleted file mode 100644 index 72fa77d4c4..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GcGame.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.dolphinemu.dolphinemu.model; - - -import java.io.File; - -public final class GcGame implements Game -{ - private String mTitle; - private String mDescription; - private String mPath; - private String mGameId; - private String mScreenshotFolderPath; - - private String mDate; - - private int mCountry; - private int mPlatform = PLATFORM_GC; - - private static final String PATH_SCREENSHOT_FOLDER = "file:///sdcard/dolphin-emu/ScreenShots/"; - - public GcGame(String title, String description, int country, String path, String gameId, String date) - { - mTitle = title; - mDescription = description; - mCountry = country; - mPath = path; - mGameId = gameId; - mDate = date; - mScreenshotFolderPath = PATH_SCREENSHOT_FOLDER + getGameId() + "/"; - } - - @Override - public int getPlatform() - { - return mPlatform; - } - - @Override - public String getTitle() - { - return mTitle; - } - - @Override - public String getDescription() - { - return mDescription; - } - - @Override - public String getDate() - { - return mDate; - } - - @Override - public int getCountry() - { - return mCountry; - } - - @Override - public String getPath() - { - return mPath; - } - - public String getGameId() - { - return mGameId; - } - - public String getScreenshotFolderPath() - { - return mScreenshotFolderPath; - } - - @Override - public String getScreenPath() - { - // Count how many screenshots are available, so we can use the most recent one. - File screenshotFolder = new File(mScreenshotFolderPath.substring(mScreenshotFolderPath.indexOf('s') - 1)); - int screenCount = 0; - - if (screenshotFolder.isDirectory()) - { - screenCount = screenshotFolder.list().length; - } - - String screenPath = mScreenshotFolderPath - + getGameId() + "-" - + screenCount + ".png"; - - return screenPath; - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/WiiGame.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/WiiGame.java deleted file mode 100644 index d0678f4e95..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/WiiGame.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.dolphinemu.dolphinemu.model; - - -public final class WiiGame implements Game -{ - @Override - public int getPlatform() - { - return 0; - } - - @Override - public String getDate() - { - return null; - } - - @Override - public String getTitle() - { - return null; - } - - @Override - public String getDescription() - { - return null; - } - - @Override - public int getCountry() - { - return 13; - } - - @Override - public String getPath() - { - return null; - } - - @Override - public String getGameId() - { - return null; - } - - @Override - public String getScreenPath() - { - return null; - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java index 18e271e0f5..d578a7a8f2 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/viewholders/GameViewHolder.java @@ -1,16 +1,11 @@ package org.dolphinemu.dolphinemu.viewholders; -import android.app.Activity; -import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.View; -import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; import org.dolphinemu.dolphinemu.R; -import org.dolphinemu.dolphinemu.dialogs.GameDetailsDialog; -import org.dolphinemu.dolphinemu.emulation.EmulationActivity; import org.dolphinemu.dolphinemu.model.Game; @@ -18,7 +13,7 @@ public class GameViewHolder extends RecyclerView.ViewHolder { public ImageView imageScreenshot; public TextView textGameTitle; - public TextView textDescription; + public TextView textCompany; // Used to handle onClick(). Set this in onBindViewHolder(). public String path; @@ -33,6 +28,6 @@ public class GameViewHolder extends RecyclerView.ViewHolder imageScreenshot = (ImageView) itemView.findViewById(R.id.image_game_screen); textGameTitle = (TextView) itemView.findViewById(R.id.text_game_title); - textDescription = (TextView) itemView.findViewById(R.id.text_game_description); + textCompany = (TextView) itemView.findViewById(R.id.text_company); } } diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_company.png new file mode 100644 index 0000000000000000000000000000000000000000..69dba7ac8fbff01e6827389904175d6a4a59844d GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL0wmRZ7KH&Rg=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G&@^*J&_}|`tWO>_%)r1c48n{Iv*t(u z1!s7=IEF+VetY8}Z-W94>xE66i%+QRYDq6Nl5O?O literal 0 HcmV?d00001 diff --git a/Source/Android/app/src/main/res/drawable-mdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-mdpi/ic_company.png new file mode 100644 index 0000000000000000000000000000000000000000..481de5052d7c1a9fffb9c5400979b14b7f87be2e GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;Lb6AYF9SoB8UsT^3j@P1pisjL z28L1t28LG&3=CE?7#PG0=Ijcz0ZK3>dAqwX{BQ3+vmeOgEbxddW?Tt)5S5w8GK3jf3Rggzv`X?>U=+P7jK@c z5;pN3$L-|somvNON&k6rDRV=VbD(>~VouuxD|gr| y&A;TBcAD-=Rnz^vnaj47JAbI(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W>XMsm#F#`j)FbFd;%$g$s z6wLB;aSX}0_x8p~P6h=Y7Kh+1U$c21iJo|KxxJ@9=fDfya3&584h_+aH+NWAShjF< z^%g5AERasVe=dYgAVBfL+l}%L4o@B1k5zm%bZ}^OsN&!_p~uX$>9mNlz=Z#b3Jbn3 hU}0opV)`|g^K1G>!#_Qf?18p2c)I$ztaD0e0s!zNO56Yd literal 0 HcmV?d00001 diff --git a/Source/Android/app/src/main/res/drawable-xxhdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_company.png new file mode 100644 index 0000000000000000000000000000000000000000..96fa6ac8f0f5bb6ab5279a8a1237798e52d7cf7e GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0vp^IUvlz0wh)Q=eq$Zg=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G&@^*J&_}|`tWO>_%)r1c48n{Iv*t(u z1)qDmIEGZ*dV9x_>#%|d%Y}%lr|VX$=kp7Q3&}XYE!Ld$#nEnZKPkvont?K*OD?V@L zm9y8)UOeb-lVk=0;R_$x?yCKL)tL8hHgDB~Q)wWheH`>NE?h5joAvxGua($esM!5W z3)Hvf@ZRca1cJ;9Qd`(^kAX}z$$*M+zQ}1lXBrV-INK29h_g()-ZE(aYZHLE_Ral- Z_-8YW-yLN66$|t-gQu&X%Q~loCIC2ngzo?V literal 0 HcmV?d00001 diff --git a/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_company.png b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_company.png new file mode 100644 index 0000000000000000000000000000000000000000..967aa1fbe28da71a9f404dfab478f0841e7b2935 GIT binary patch literal 411 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q1xWh(YZ(J6g=CK)Uj~LMH3o);76yi2K%s^g z3=E|P3=FRl7#OT(FffQ0%-I!a1C(G&@^*J&_}|`tWO>_%)r1c48n{Iv*t)J zFfa;xx;TbZ+^M56Xzb+MjedVPO#8RNyK;=^wb*Jv`ZiSkl z0yZY2LGPKK8q7%!OdJ8fF$KO|f3GnMY&ygs77b@{ZVNT2kC<3IpgwYFcrt + tools:text="Nintendo"/> diff --git a/Source/Android/app/src/main/res/layout/dialog_game_details.xml b/Source/Android/app/src/main/res/layout/dialog_game_details.xml index b431991baf..940c69cdc1 100644 --- a/Source/Android/app/src/main/res/layout/dialog_game_details.xml +++ b/Source/Android/app/src/main/res/layout/dialog_game_details.xml @@ -32,6 +32,7 @@ android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:transitionName="image_game_screen" + tools:scaleType="centerCrop" tools:src="@drawable/placeholder_screenshot"/> @@ -69,7 +67,7 @@ android:layout_height="1dp" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" - android:layout_below="@+id/text_game_description" + android:layout_below="@+id/text_company" android:layout_marginTop="16dp" android:background="#1F000000"/> @@ -85,14 +83,14 @@ android:src="@drawable/ic_country"/> + tools:text="Nintendo"/> pVolume(DiscIO::CreateVolumeFromFilename(filename)); - - if (pVolume != nullptr) - { - bool is_wii_title = pVolume->IsWiiDisc() || pVolume->IsWadFile(); - - __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Is %s a Wii Disc: %s", filename.c_str(), is_wii_title ? "Yes" : "No" ); - - return is_wii_title; - } - - // Technically correct. - return false; -} - static int GetCountry(std::string filename) { std::unique_ptr pVolume(DiscIO::CreateVolumeFromFilename(filename)); @@ -192,10 +175,41 @@ static int GetCountry(std::string filename) return country; } - // Technically correct. + // Return UNKNOWN return 13; } +static int GetPlatform(std::string filename) +{ + std::unique_ptr pVolume(DiscIO::CreateVolumeFromFilename(filename)); + + if (pVolume != nullptr) + { + bool is_wii_disc = pVolume->IsWiiDisc(); + bool is_wii_wad = pVolume->IsWadFile(); + + if (is_wii_disc) + { + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a Wii disc."); + + // See Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/Game.java + return 1; + } + else if (is_wii_wad) + { + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a Wii WAD."); + return 2; + } + else + { + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Volume is a Gamecube disc."); + return 0; + } + } + + return -1; +} + static std::string GetTitle(std::string filename) { __android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Title for file: %s", filename.c_str()); @@ -292,15 +306,15 @@ static std::string GetGameId(std::string filename) return std::string (""); } -static std::string GetApploaderDate(std::string filename) +static std::string GetCompany(std::string filename) { - __android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Date for file: %s", filename.c_str()); + __android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Company for file: %s", filename.c_str()); DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(filename); if (pVolume != nullptr) { - std::string date = pVolume->GetApploaderDate(); - __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Date: %s", date.c_str()); + std::string date = pVolume->GetCompany(); + __android_log_print(ANDROID_LOG_INFO, DOLPHIN_TAG, "Company: %s", date.c_str()); return date; } @@ -349,9 +363,9 @@ JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBann JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDescription(JNIEnv *env, jobject obj, jstring jFilename); JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId(JNIEnv *env, jobject obj, jstring jFilename); JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv *env, jobject obj, jstring jFilename); -JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDate(JNIEnv *env, jobject obj, jstring jFilename); +JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(JNIEnv *env, jobject obj, jstring jFilename); JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize(JNIEnv *env, jobject obj, jstring jFilename); -JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsWiiTitle(JNIEnv *env, jobject obj, jstring jFilename); +JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv *env, jobject obj, jstring jFilename); JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj); JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj); JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SaveScreenShot(JNIEnv *env, jobject obj); @@ -423,11 +437,11 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetGameId return env->NewStringUTF(id.c_str()); } -JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDate(JNIEnv *env, jobject obj, jstring jFilename) +JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCompany(JNIEnv *env, jobject obj, jstring jFilename) { std::string filename = GetJString(env, jFilename); - std::string date = GetApploaderDate(filename); - return env->NewStringUTF(date.c_str()); + std::string company = GetCompany(filename); + return env->NewStringUTF(company.c_str()); } JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetCountry(JNIEnv *env, jobject obj, jstring jFilename) @@ -444,11 +458,11 @@ JNIEXPORT jlong JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetFilesize return size; } -JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_IsWiiTitle(JNIEnv *env, jobject obj, jstring jFilename) +JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(JNIEnv *env, jobject obj, jstring jFilename) { std::string filename = GetJString(env, jFilename); - bool wiiDisc = IsWiiTitle(filename); - return wiiDisc; + int platform = GetPlatform(filename); + return platform; } JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj)