commit eaa3c873440efa970cc3932eb69f6f4135c235bc
parent c9f2e2c93a22540c1154e3eca8ade3a1045c8f13
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Fri, 6 Jan 2023 14:31:52 +0100
Add the os error to preset-load
Diffstat:
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/clap/ext/draft/preset-load.h b/include/clap/ext/draft/preset-load.h
@@ -20,9 +20,14 @@ typedef struct clap_plugin_preset_load {
typedef struct clap_host_preset_load {
// Called if clap_plugin_preset_load.load() failed.
+ // os_error: the operating system error, if applicable. If not applicable set it to a non-error
+ // value, eg: 0 on unix and Windows.
//
// [main-thread]
- void(CLAP_ABI *on_error)(const clap_plugin_t *plugin, const char *uri, const char *msg);
+ void(CLAP_ABI *on_error)(const clap_plugin_t *plugin,
+ const char *uri,
+ int32_t os_error,
+ const char *msg);
// Informs the host that the following preset has been loaded.
// This contributes to keep in sync the host preset browser and plugin preset browser.
diff --git a/include/clap/factory/draft/preset-discovery.h b/include/clap/factory/draft/preset-discovery.h
@@ -84,7 +84,7 @@ typedef struct clap_preset_discovery_metadata_receiver {
// If there is an error reading metadata from a file this should be called with an error
// message.
// os_error: the operating system error, if applicable. If not applicable set it to a non-error
- // value: 0 on unix and Windows.
+ // value, eg: 0 on unix and Windows.
void(CLAP_ABI *on_error)(const struct clap_preset_discovery_metadata_receiver *receiver,
int32_t os_error,
const char *error_message);