mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Cocoa: Fixe open file dialog not filtering files in executable compiled by buildbot
This commit is contained in:
parent
1010953830
commit
bbf858e6ab
@ -523,8 +523,11 @@ cc_result Window_OpenFileDialog(const char* const* filters, OpenFileDialogCallba
|
|||||||
}
|
}
|
||||||
|
|
||||||
[dlg setCanChooseFiles: YES];
|
[dlg setCanChooseFiles: YES];
|
||||||
[dlg setAllowedFileTypes:types];
|
if ([dlg runModalForTypes:types] != NSOKButton) return 0;
|
||||||
if ([dlg runModal] != NSOKButton) return 0;
|
// unfortunately below code doesn't work when linked against SDK < 10.6
|
||||||
|
// https://developer.apple.com/documentation/appkit/nssavepanel/1534419-allowedfiletypes
|
||||||
|
// [dlg setAllowedFileTypes:types];
|
||||||
|
// if ([dlg runModal] != NSOKButton) return 0;
|
||||||
|
|
||||||
files = [dlg URLs];
|
files = [dlg URLs];
|
||||||
if ([files count] < 1) return 0;
|
if ([files count] < 1) return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user