|
|
@ -485,12 +485,15 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|
|
|
val FRAMETIME = 2
|
|
|
|
val FRAMETIME = 2
|
|
|
|
val SPEED = 3
|
|
|
|
val SPEED = 3
|
|
|
|
perfStatsUpdater = {
|
|
|
|
perfStatsUpdater = {
|
|
|
|
if (emulationViewModel.emulationStarted.value) {
|
|
|
|
if (emulationViewModel.emulationStarted.value &&
|
|
|
|
|
|
|
|
!emulationViewModel.isEmulationStopping.value
|
|
|
|
|
|
|
|
) {
|
|
|
|
val perfStats = NativeLibrary.getPerfStats()
|
|
|
|
val perfStats = NativeLibrary.getPerfStats()
|
|
|
|
val cpuBackend = NativeLibrary.getCpuBackend()
|
|
|
|
val cpuBackend = NativeLibrary.getCpuBackend()
|
|
|
|
|
|
|
|
val gpuDriver = NativeLibrary.getGpuDriver()
|
|
|
|
if (_binding != null) {
|
|
|
|
if (_binding != null) {
|
|
|
|
binding.showFpsText.text =
|
|
|
|
binding.showFpsText.text =
|
|
|
|
String.format("FPS: %.1f\n%s", perfStats[FPS], cpuBackend)
|
|
|
|
String.format("FPS: %.1f\n%s/%s", perfStats[FPS], cpuBackend, gpuDriver)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
|
|
|
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
|
|
|
}
|
|
|
|
}
|
|
|
|