aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-06-21 23:01:00 +0200
committerdec05eba <dec05eba@protonmail.com>2024-06-21 23:01:00 +0200
commit46da55b1eafef7495204a6733193057853d6575a (patch)
tree18eb699e521da4265f97e527cb1d3eecbb35c9a8 /src/main.cpp
parentfab9fc9993af7220a6941e975f82cbfbfd109934 (diff)
fm content: make sure to capture frame on damage and then no damage after fps frame timeout
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5d233f2..71980cf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2719,13 +2719,15 @@ int main(int argc, char **argv) {
damage_fps_counter = 0;
}
- const bool damaged = !capture->consume_damage || capture->consume_damage(capture);
+ const bool damaged = !capture->is_damaged || capture->is_damaged(capture);
if(damaged) {
++damage_fps_counter;
}
double frame_time_overflow = frame_timer_elapsed - target_fps;
if (frame_time_overflow >= 0.0 && damaged) {
+ if(capture->clear_damage)
+ capture->clear_damage(capture);
frame_time_overflow = std::min(frame_time_overflow, target_fps);
frame_timer_start = time_now - frame_time_overflow;