Skip to content

Commit

Permalink
get_fps.sh: Limit max fps to display refresh rate
Browse files Browse the repository at this point in the history
  • Loading branch information
NasdaqGodzilla committed Mar 22, 2023
1 parent c9664d6 commit b206676
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions get_fps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ function calculate_framerate() {
fi

fps=`echo "1000/$aver_total" | bc`

[[ "$fps" -gt "$get_fps_display_refres_rate" ]] && { \
fps="$get_fps_display_refres_rate"
}
}

function calculate_average() {
Expand Down Expand Up @@ -217,6 +221,11 @@ then
return -1
fi

get_fps_display_refres_rate=`utils_get_display_refreshrate`
[[ "0" -ge "$get_fps_display_refres_rate" ]] && { \
get_fps_display_refres_rate=60
}

gfxinfo_raw=$(dumpsys gfxinfo $target_pkg)

# Prepare profile data
Expand Down

0 comments on commit b206676

Please sign in to comment.