Implement cardinal specific async dialogs in voxglitch

Closes #183

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-03-07 16:23:37 +00:00
parent 15903d585f
commit 572e26c7da
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
3 changed files with 16 additions and 3 deletions

View file

@ -1,6 +1,6 @@
/*
* DISTRHO Cardinal Plugin
* Copyright (C) 2021 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -53,6 +53,19 @@
#include <functional>
#define USING_CARDINAL_NOT_RACK
// OS separator macros
#ifdef ARCH_WIN
# define CARDINAL_OS_SEP '\\'
# define CARDINAL_OS_SEP_STR "\\"
# define CARDINAL_OS_SPLIT ';'
# define CARDINAL_OS_SPLIT_STR ";"
#else
# define CARDINAL_OS_SEP '/'
# define CARDINAL_OS_SEP_STR "/"
# define CARDINAL_OS_SPLIT ':'
# define CARDINAL_OS_SPLIT_STR ":"
#endif
// opens a file browser, startDir and title can be null
// action is always triggered on close (path can be null), must be freed if not null
void async_dialog_filebrowser(bool saving, const char* startDir, const char* title,