android: frontend: Cleanup perf stats.
This commit is contained in:
parent
1d79e59870
commit
5029373225
@ -18,6 +18,8 @@ import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import org.citra.citra_android.NativeLibrary;
|
||||
import org.citra.citra_android.R;
|
||||
import org.citra.citra_android.activities.EmulationActivity;
|
||||
@ -213,12 +215,12 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
|
||||
perfStatsUpdater = () ->
|
||||
{
|
||||
final DecimalFormat df = new DecimalFormat("#.#");
|
||||
double[] perfStats = NativeLibrary.GetPerfStats();
|
||||
mPerfStats
|
||||
.setText(String.format("FPS: %.5s\nFrametime: %.7sms\nSpeed: %.4s%%", perfStats[FPS],
|
||||
perfStats[FRAMETIME] * 1000.0, perfStats[SPEED] * 100.0));
|
||||
mPerfStats.setText(String.format("FPS: %s Speed: %s%%", df.format(perfStats[FPS]),
|
||||
df.format(perfStats[SPEED] * 100.0)));
|
||||
|
||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 3000 /* 3s */);
|
||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 2000 /* 1s */);
|
||||
};
|
||||
perfStatsUpdateHandler.post(perfStatsUpdater);
|
||||
}
|
||||
|
@ -30,7 +30,8 @@
|
||||
android:longClickable="false"
|
||||
android:shadowColor="@android:color/black"
|
||||
android:text="TextView"
|
||||
android:textColor="@android:color/white" />
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/done_control_config"
|
||||
|
Loading…
x
Reference in New Issue
Block a user