summaryrefslogtreecommitdiff
path: root/Source/Android/jni/GameList/GameFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Android/jni/GameList/GameFile.cpp')
-rw-r--r--Source/Android/jni/GameList/GameFile.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Android/jni/GameList/GameFile.cpp b/Source/Android/jni/GameList/GameFile.cpp
index 3bf60beb28..dc922d701c 100644
--- a/Source/Android/jni/GameList/GameFile.cpp
+++ b/Source/Android/jni/GameList/GameFile.cpp
@@ -3,12 +3,14 @@
#include "jni/GameList/GameFile.h"
+#include <chrono>
#include <memory>
#include <utility>
#include <vector>
#include <jni.h>
+#include "Core/TimePlayed.h"
#include "DiscIO/Blob.h"
#include "DiscIO/Enums.h"
#include "UICommon/GameFile.h"
@@ -190,6 +192,13 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_getBannerHe
return static_cast<jint>(GetRef(env, obj)->GetBannerImage().height);
}
+JNIEXPORT jlong JNICALL
+Java_org_dolphinemu_dolphinemu_model_GameFile_getTimePlayedMsInternal(JNIEnv* env, jobject obj)
+{
+ const std::chrono::milliseconds time = TimePlayed().GetTimePlayed(GetRef(env, obj)->GetGameID());
+ return time.count();
+}
+
JNIEXPORT jobject JNICALL Java_org_dolphinemu_dolphinemu_model_GameFile_parse(JNIEnv* env, jclass,
jstring path)
{