monitor: Add helper to parse simple mode strings
This will be used to extract the resolution and refresh rate from strings like "1920x1080@60.0" or "1280x720". This aims to replace the use of the locale dependent sscanf() function. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2902>
This commit is contained in:
@ -318,4 +318,11 @@ gboolean meta_monitor_set_hdr_metadata (MetaMonitor *monitor,
|
||||
MetaOutputHdrMetadata *metadata,
|
||||
GError **error);
|
||||
|
||||
META_EXPORT_TEST
|
||||
gboolean meta_parse_monitor_mode (const char *string,
|
||||
int *out_width,
|
||||
int *out_height,
|
||||
float *out_refresh_rate,
|
||||
float fallback_refresh_rate);
|
||||
|
||||
#endif /* META_MONITOR_H */
|
||||
|
Reference in New Issue
Block a user