From 7525aa1c5c7f6432f0d6ac7db661869ca5fa5caa Mon Sep 17 00:00:00 2001 From: Penwywern Date: Tue, 22 Aug 2023 20:56:40 +0200 Subject: [PATCH] docs: Add precision on editable string lists --- docs/sphinx/reference-properties.rst | 6 ++++++ docs/sphinx/reference-settings.rst | 3 +++ 2 files changed, 9 insertions(+) diff --git a/docs/sphinx/reference-properties.rst b/docs/sphinx/reference-properties.rst index 48bc4bec3..e647def0d 100644 --- a/docs/sphinx/reference-properties.rst +++ b/docs/sphinx/reference-properties.rst @@ -741,6 +741,9 @@ Property Modification Functions :param val: The actual string value stored and will be returned by :c:func:`obs_data_get_string` :returns: The index of the list item. + Note: If ``p`` is of type OBS_COMBO_TYPE_EDITABLE, :c:func:`obs_data_get_string` will return ``name`` instead of + ``val``. + --------------------- .. function:: size_t obs_property_list_add_int(obs_property_t *p, const char *name, long long val) @@ -771,6 +774,9 @@ Property Modification Functions :param name: Localized name shown to user :param val: The actual string value stored and will be returned by :c:func:`obs_data_get_string` + Note: If ``p`` is of type OBS_COMBO_TYPE_EDITABLE, :c:func:`obs_data_get_string` will return ``name`` instead of + ``val``. + --------------------- .. function:: void obs_property_list_insert_int(obs_property_t *p, size_t idx, const char *name, long long val) diff --git a/docs/sphinx/reference-settings.rst b/docs/sphinx/reference-settings.rst index dcb2ed630..60bd8940c 100644 --- a/docs/sphinx/reference-settings.rst +++ b/docs/sphinx/reference-settings.rst @@ -188,6 +188,9 @@ Get Functions .. function:: const char *obs_data_get_string(obs_data_t *data, const char *name) + Note: If the data object was generated from a OBS_COMBO_TYPE_EDITABLE property, the property's ``name`` will be + returned instead of its ``val``. + --------------------- .. function:: long long obs_data_get_int(obs_data_t *data, const char *name)