mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-26 10:15:49 +01:00
android: show current backend in fps overlay
This commit is contained in:
parent
1cde01c8c8
commit
20de0ddf1f
@ -299,6 +299,11 @@ object NativeLibrary {
|
|||||||
*/
|
*/
|
||||||
external fun getPerfStats(): DoubleArray
|
external fun getPerfStats(): DoubleArray
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current CPU backend.
|
||||||
|
*/
|
||||||
|
external fun getCpuBackend(): String
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies the core emulation that the orientation has changed.
|
* Notifies the core emulation that the orientation has changed.
|
||||||
*/
|
*/
|
||||||
|
@ -414,8 +414,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||||||
perfStatsUpdater = {
|
perfStatsUpdater = {
|
||||||
if (emulationViewModel.emulationStarted.value) {
|
if (emulationViewModel.emulationStarted.value) {
|
||||||
val perfStats = NativeLibrary.getPerfStats()
|
val perfStats = NativeLibrary.getPerfStats()
|
||||||
|
val cpuBackend = NativeLibrary.getCpuBackend()
|
||||||
if (_binding != null) {
|
if (_binding != null) {
|
||||||
binding.showFpsText.text = String.format("FPS: %.1f", perfStats[FPS])
|
binding.showFpsText.text =
|
||||||
|
String.format("FPS: %.1f\n%s", perfStats[FPS], cpuBackend)
|
||||||
}
|
}
|
||||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
||||||
}
|
}
|
||||||
|
@ -694,6 +694,14 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl
|
|||||||
return j_stats;
|
return j_stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) {
|
||||||
|
if (Settings::IsNceEnabled()) {
|
||||||
|
return ToJString(env, "NCE");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ToJString(env, "JIT");
|
||||||
|
}
|
||||||
|
|
||||||
void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env,
|
void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env,
|
||||||
jclass clazz,
|
jclass clazz,
|
||||||
jstring j_path) {}
|
jstring j_path) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user