output: Add meta_output_info_get_min_refresh_rate()
This function gets the minimum refresh rate of an output if it was found in EDID. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3576>
This commit is contained in:
parent
a96d524503
commit
cb40a1c510
@ -509,6 +509,25 @@ meta_output_set_privacy_screen_enabled (MetaOutput *output,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_output_info_get_min_refresh_rate (const MetaOutputInfo *output_info,
|
||||
int *min_refresh_rate)
|
||||
{
|
||||
int min_vert_rate_hz;
|
||||
|
||||
if (!output_info->edid_info)
|
||||
return FALSE;
|
||||
|
||||
min_vert_rate_hz = output_info->edid_info->min_vert_rate_hz;
|
||||
|
||||
if (min_vert_rate_hz <= 0)
|
||||
return FALSE;
|
||||
|
||||
*min_refresh_rate = min_vert_rate_hz;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_output_set_color_space (MetaOutput *output,
|
||||
MetaOutputColorspace color_space)
|
||||
|
@ -195,6 +195,9 @@ META_EXPORT_TEST
|
||||
void meta_output_info_parse_edid (MetaOutputInfo *output_info,
|
||||
GBytes *edid);
|
||||
|
||||
gboolean meta_output_info_get_min_refresh_rate (const MetaOutputInfo *output_info,
|
||||
int *min_refresh_rate);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaOutputInfo, meta_output_info_unref)
|
||||
|
||||
#define META_TYPE_OUTPUT (meta_output_get_type ())
|
||||
|
Loading…
x
Reference in New Issue
Block a user