@@ -140,10 +140,21 @@ void ffPrintDisplay(FFDisplayOptions* options)
140
140
{
141
141
double ppi = sqrt (result -> width * result -> width + result -> height * result -> height ) / inch ;
142
142
143
+ char refreshRate [16 ];
144
+ if (result -> refreshRate > 0 )
145
+ {
146
+ if (options -> preciseRefreshRate )
147
+ snprintf (refreshRate , sizeof (refreshRate ), "%g" , ((int ) (result -> refreshRate * 1000 + 0.5 )) / 1000.0 );
148
+ else
149
+ snprintf (refreshRate , sizeof (refreshRate ), "%i" , (uint32_t ) (result -> refreshRate + 0.5 ));
150
+ }
151
+ else
152
+ refreshRate [0 ] = 0 ;
153
+
143
154
FF_PRINT_FORMAT_CHECKED (key .chars , 0 , & options -> moduleArgs , FF_PRINT_TYPE_NO_CUSTOM_KEY , FF_DISPLAY_NUM_FORMAT_ARGS , ((FFformatarg []) {
144
155
{FF_FORMAT_ARG_TYPE_UINT , & result -> width , "width" },
145
156
{FF_FORMAT_ARG_TYPE_UINT , & result -> height , "height" },
146
- {FF_FORMAT_ARG_TYPE_DOUBLE , & result -> refreshRate , "refresh-rate" },
157
+ {FF_FORMAT_ARG_TYPE_STRING , refreshRate , "refresh-rate" },
147
158
{FF_FORMAT_ARG_TYPE_UINT , & result -> scaledWidth , "scaled-width" },
148
159
{FF_FORMAT_ARG_TYPE_UINT , & result -> scaledHeight , "scaled-height" },
149
160
{FF_FORMAT_ARG_TYPE_STRBUF , & result -> name , "name" },
0 commit comments