From daa92e310b1108bfccc8024adec201dcf0a8f5e3 Mon Sep 17 00:00:00 2001 From: FiniteSingularity Date: Fri, 2 Feb 2024 15:55:31 -0600 Subject: [PATCH] libobs: Fix file filter for save file path widget --- docs/sphinx/reference-properties.rst | 11 ++++++----- libobs/obs-properties.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/sphinx/reference-properties.rst b/docs/sphinx/reference-properties.rst index 554a2348384a0d..ece1b3bf342ffb 100644 --- a/docs/sphinx/reference-properties.rst +++ b/docs/sphinx/reference-properties.rst @@ -173,8 +173,8 @@ Property Object Functions Adds a 'path' property. Can be a directory or a file. - If target is a file path, the filters should be this format, separated by - double semicolons, and extensions separated by space:: + If target is a file path or file save, the filters should be this format, + separated by double semicolons, and extensions separated by space:: "Example types 1 and 2 (*.ex1 *.ex2);;Example type 3 (*.ex3)" @@ -187,9 +187,10 @@ Property Object Functions - **OBS_PATH_DIRECTORY** - Directory :param filter: If type is a file path, then describes the file filter - that the user can browse. Items are separated via - double semicolons. If multiple file types in a - filter, separate with space. + that the user can browse. If type is a save path, + then describes the file types the file can be + saved as. Items are separated via double semicolons. + If multiple file types in a filter, separate with space. :param default_path: The default path to start in, or *NULL* :return: The property diff --git a/libobs/obs-properties.c b/libobs/obs-properties.c index 9bb2fcb46b7f89..97154ee8775009 100644 --- a/libobs/obs-properties.c +++ b/libobs/obs-properties.c @@ -616,7 +616,7 @@ obs_property_t *obs_properties_add_path(obs_properties_t *props, data->type = type; data->default_path = bstrdup(default_path); - if (data->type == OBS_PATH_FILE) + if (data->type == OBS_PATH_FILE || data->type == OBS_PATH_FILE_SAVE) data->filter = bstrdup(filter); return p;