Define custom Cardinal API for async dialogs

Closes #51

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-12-11 21:53:50 +00:00
parent b6ac2766dc
commit ce64476fa4
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
6 changed files with 242 additions and 8 deletions

View file

@ -322,6 +322,20 @@ public:
void uiIdle() override
{
if (filebrowserhandle != nullptr && fileBrowserIdle(filebrowserhandle))
{
{
const char* const path = fileBrowserGetPath(filebrowserhandle);
const ScopedContext sc(this);
filebrowseraction(path != nullptr ? strdup(path) : nullptr);
}
fileBrowserClose(filebrowserhandle);
filebrowseraction = nullptr;
filebrowserhandle = nullptr;
}
repaint();
}