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