0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00
Commit Graph

37 Commits

Author SHA1 Message Date
Norihiro Kamae
4837a3417f libobs/util: Remove unused static-inline function
The commit 862f16285f commented the function out and the function became
unused.
2024-08-07 17:27:49 -04:00
Lain
106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
derrod
e720bb4c09 libobs: Use uthash for config 2023-03-18 10:47:49 +01:00
derrod
75693a6682 libobs: Write default values to config 2023-03-07 17:44:19 -05:00
jpark37
8a43c55918 libobs/util: Fix pthread mutex leaks 2021-08-23 22:57:10 -07:00
Richard Stanway
862f16285f libobs: Don't strip whitespace from config values
A plugin that saves whitespace-only data would crash OBS on startup as
the whitespace stripping would send the string length negative. While
that bug is fixed in this commit, there is also no good reason that OBS
is stripping whitespace to begin with. All data going into the configs
should be well formed and some plugins legitimately wish to save
whitespace as a config option (eg for search / replace characters).
2020-02-23 04:02:42 +01:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Richard Stanway
3ddfc55e46 libobs: Fix missing mutex unlock from 26dbe54 2019-02-18 23:42:01 +01:00
Richard Stanway
26dbe54896 libobs: Check fwrite return value for extra safety 2019-02-18 17:49:33 +01:00
jp9000
8fdfdd9dd2 libobs/util: Fix blank config file values being ignored
If a config file value is set to a blank value, the value would not be
set and the default value would be used.  This fixes a bug where the
user would try to remove the replay buffer prefix, only to have the
prefix be added again next time they start the program.
2018-02-27 01:52:25 -08:00
jp9000
6d3777129d libobs/util: Use os_safe_replace in safe file writes 2017-05-04 18:23:23 -07:00
jp9000
7fba736df9 libobs/util: Use a mutex with config files 2017-02-21 23:03:18 -08:00
Palana
1cd98ae008 libobs/util: Fix config value line break unescaping
Given a config file with some value "foo=\\n" querying the value of foo
would return {'\\', '\n', 0}, instead of {'\\', 'n', 0}
2015-11-27 15:48:30 +01:00
jp9000
05748195a8 libobs/util: Save filename in config_create
Fixes a bug where config_save could not save the file due to the fact
that it did not store the path of the file as it was supposed to.
2015-10-04 21:16:26 -07:00
jp9000
46101b6d5b libobs: Fix various string format warnings
GCC 5.1+ seems to be more aggressive about spotting potentially
non-matching printf format specifiers.
2015-08-30 23:41:09 -07:00
jp9000
f29431d8db libobs/util: Add config_save_safe function
This safely saves a configuration file, optionally with a backup.
2015-08-21 17:42:24 -07:00
jp9000
6bf2be407b libobs/util: Add config_remove_value function 2015-07-03 09:57:51 -07:00
jp9000
5bcaa7b590 libobs/util: Do not add empty config file values
This allows config file values to defer to their defaults instead of
being null.
2015-07-02 17:18:43 -07:00
Palana
ae19eec2c6 util: Improve handling of config values with linebreaks 2015-05-07 01:55:12 +02:00
jp9000
d44d3b1f0a libobs: Use locale-independent double conversion
Prevents issues on specific locales, especially where decimal points are
represented by commas rather than periods.
2015-03-22 19:18:07 -07:00
jp9000
5888085a8e Allow hex numbers to be used in config data
This allows the 0x* format of hexadecimal integers to be used as config
integers.
2014-11-17 06:47:48 -08:00
jp9000
397dda78f8 Add config_open_string function
This allows opening ini config data from a string.  Before, it was only
possible to load config from a file.
2014-11-17 06:47:48 -08:00
jp9000
41fad2d1a4 (API Change) Use const params where applicable
This Fixes a minor flaw with the API where data had to always be mutable
to be usable by the API.

Functions that do not modify the fundamental underlying data of a
structure should be marked as constant, both for safety and to signify
that the parameter is input only and will not be modified by the
function using it.
2014-09-26 17:23:07 -07:00
jp9000
c9df41c1e2 (API Change) Remove pointers from all typedefs
Typedef pointers are unsafe.  If you do:
typedef struct bla *bla_t;
then you cannot use it as a constant, such as: const bla_t, because
that constant will be to the pointer itself rather than to the
underlying data.  I admit this was a fundamental mistake that must
be corrected.

All typedefs that were pointer types will now have their pointers
removed from the type itself, and the pointers will be used when they
are actually used as variables/parameters/returns instead.

This does not break ABI though, which is pretty nice.
2014-09-25 21:48:11 -07:00
Palana
850d92bac0 libobs: Add config_has_(user|default)_value functions
Similar to obs_data_has_(user_value|default|autoselect), these allow
library users to distinguish between user config values and default
values
2014-07-13 19:10:38 +02:00
Palana
3990c18aac Add NULL checks and assertions to fix clang static analysis problems
Also remove an unused variable from obs-encoder.c (via clang static
analysis)
2014-04-14 23:02:53 +02:00
jp9000
fd579fe7f4 Make audio devices save to settings
Also, revamp the settings dialog code and make it use signals and slots
a bit better.
2014-03-07 12:56:31 -07:00
jp9000
b067440f73 Use bzalloc instead of bmalloc then memset
Reduces needless code repetition and still allows for proper memory
alignment.  Cleans up the code a bit.
2014-02-09 12:34:07 -07:00
jp9000
e9ded173f1 add my signal/callback interface from another project, also update license of utility files to ISC 1.3 2013-12-25 22:40:33 -07:00
jp9000
4da1c193dc fix minor bug in config file parser 2013-12-18 12:08:38 -07:00
jp9000
a4055e4257 fixed a bug writing to config files where it would use a brace instead of a bracket when creating a section 2013-12-17 18:16:36 -07:00
jp9000
ed388fc82e replaced boolean trap parameter in the base lexer 2013-12-16 00:05:27 -07:00
jp9000
5edc9cf9cb added some more config file functions for going through each section 2013-12-12 21:42:44 -07:00
jp9000
70290b8c2b fixed locale code, added locale files, made wx use locale files, fixed some bugs, and added platform-specific files to the main program 2013-12-07 10:22:56 -07:00
jp9000
3c6494a11d fixed a few bugs with config files, and replaced a boolean parameter with an enum 2013-11-23 23:34:38 -07:00
jp9000
18834c6a45 some static analysis cleanup 2013-10-17 17:21:42 -07:00
jp9000
f255ae1922 first commit 2013-09-30 19:37:13 -07:00