GUI: fix macOS system file picker crash
This commit is contained in:
parent
d47c50edaf
commit
35bc757adf
4 changed files with 20 additions and 0 deletions
|
|
@ -67,7 +67,11 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector<String> filter, c
|
|||
if (sysDialog) {
|
||||
#ifdef USE_NFD
|
||||
dialogOK=false;
|
||||
#ifdef NFD_NON_THREADED
|
||||
_nfdThread(NFDState(false,header,filter,path,clickCallback),&dialogOK,&nfdResult);
|
||||
#else
|
||||
dialogO=new std::thread(_nfdThread,NFDState(false,header,filter,path,clickCallback),&dialogOK,&nfdResult);
|
||||
#endif
|
||||
#else
|
||||
dialogO=new pfd::open_file(header,path,filter);
|
||||
#endif
|
||||
|
|
@ -87,7 +91,11 @@ bool FurnaceGUIFileDialog::openSave(String header, std::vector<String> filter, c
|
|||
if (sysDialog) {
|
||||
#ifdef USE_NFD
|
||||
dialogOK=false;
|
||||
#ifdef NFD_NON_THREADED
|
||||
_nfdThread(NFDState(true,header,filter,path,NULL),&dialogOK,&nfdResult);
|
||||
#else
|
||||
dialogS=new std::thread(_nfdThread,NFDState(true,header,filter,path,NULL),&dialogOK,&nfdResult);
|
||||
#endif
|
||||
#else
|
||||
dialogS=new pfd::save_file(header,path,filter);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue