diff options
3 files changed, 16 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index f2ba2504c..e0f01127c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt | |||
| @@ -300,6 +300,11 @@ object NativeLibrary { | |||
| 300 | external fun getPerfStats(): DoubleArray | 300 | external fun getPerfStats(): DoubleArray |
| 301 | 301 | ||
| 302 | /** | 302 | /** |
| 303 | * Returns the current CPU backend. | ||
| 304 | */ | ||
| 305 | external fun getCpuBackend(): String | ||
| 306 | |||
| 307 | /** | ||
| 303 | * Notifies the core emulation that the orientation has changed. | 308 | * Notifies the core emulation that the orientation has changed. |
| 304 | */ | 309 | */ |
| 305 | external fun notifyOrientationChange(layout_option: Int, rotation: Int) | 310 | external fun notifyOrientationChange(layout_option: Int, rotation: Int) |
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index c32fa0d7e..734c1d5ca 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | |||
| @@ -414,8 +414,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { | |||
| 414 | perfStatsUpdater = { | 414 | perfStatsUpdater = { |
| 415 | if (emulationViewModel.emulationStarted.value) { | 415 | if (emulationViewModel.emulationStarted.value) { |
| 416 | val perfStats = NativeLibrary.getPerfStats() | 416 | val perfStats = NativeLibrary.getPerfStats() |
| 417 | val cpuBackend = NativeLibrary.getCpuBackend() | ||
| 417 | if (_binding != null) { | 418 | if (_binding != null) { |
| 418 | binding.showFpsText.text = String.format("FPS: %.1f", perfStats[FPS]) | 419 | binding.showFpsText.text = |
| 420 | String.format("FPS: %.1f\n%s", perfStats[FPS], cpuBackend) | ||
| 419 | } | 421 | } |
| 420 | perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800) | 422 | perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800) |
| 421 | } | 423 | } |
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 617288ae4..ed5ce6f8a 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp | |||
| @@ -694,6 +694,14 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl | |||
| 694 | return j_stats; | 694 | return j_stats; |
| 695 | } | 695 | } |
| 696 | 696 | ||
| 697 | jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) { | ||
| 698 | if (Settings::IsNceEnabled()) { | ||
| 699 | return ToJString(env, "NCE"); | ||
| 700 | } | ||
| 701 | |||
| 702 | return ToJString(env, "JIT"); | ||
| 703 | } | ||
| 704 | |||
| 697 | void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env, | 705 | void Java_org_yuzu_yuzu_1emu_utils_DirectoryInitialization_setSysDirectory(JNIEnv* env, |
| 698 | jclass clazz, | 706 | jclass clazz, |
| 699 | jstring j_path) {} | 707 | jstring j_path) {} |