android: frontend: Further simplify show FPS overlay text.
This commit is contained in:
parent
a5633c97ce
commit
102e8ff8cf
@ -18,8 +18,6 @@ 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;
|
||||
@ -190,12 +188,13 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
||||
|
||||
perfStatsUpdater = () ->
|
||||
{
|
||||
final DecimalFormat df = new DecimalFormat("#.#");
|
||||
double[] perfStats = NativeLibrary.GetPerfStats();
|
||||
mPerfStats.setText(String.format("FPS: %s Speed: %s%%", df.format(perfStats[FPS]),
|
||||
df.format(perfStats[SPEED] * 100.0)));
|
||||
final double[] perfStats = NativeLibrary.GetPerfStats();
|
||||
if (perfStats[FPS] > 0) {
|
||||
mPerfStats.setText(String.format("FPS: %d Speed: %d%%", (int)(perfStats[FPS] + 0.5),
|
||||
(int)(perfStats[SPEED] * 100.0 + 0.5)));
|
||||
}
|
||||
|
||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 2000 /* 1s */);
|
||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater, 3000);
|
||||
};
|
||||
perfStatsUpdateHandler.post(perfStatsUpdater);
|
||||
|
||||
|
@ -29,7 +29,6 @@
|
||||
android:linksClickable="false"
|
||||
android:longClickable="false"
|
||||
android:shadowColor="@android:color/black"
|
||||
android:text="TextView"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user