mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Android: Show time played in game details
Unlike in DolphinQt, there isn't much space to show playtimes directly in the game list, so I've put it in the game details dialog instead.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user