2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-31 14:25:56 +00:00

Use sc_prefix for fps counter

This commit is contained in:
Romain Vimont
2022-02-17 19:55:14 +01:00
parent 85edba20e7
commit 03705b828b
5 changed files with 42 additions and 42 deletions

View File

@@ -242,14 +242,14 @@ set_screen_power_mode(struct sc_controller *controller,
}
static void
switch_fps_counter_state(struct fps_counter *fps_counter) {
switch_fps_counter_state(struct sc_fps_counter *fps_counter) {
// the started state can only be written from the current thread, so there
// is no ToCToU issue
if (fps_counter_is_started(fps_counter)) {
fps_counter_stop(fps_counter);
if (sc_fps_counter_is_started(fps_counter)) {
sc_fps_counter_stop(fps_counter);
LOGI("FPS counter stopped");
} else {
if (fps_counter_start(fps_counter)) {
if (sc_fps_counter_start(fps_counter)) {
LOGI("FPS counter started");
} else {
LOGE("FPS counter starting failed");