Skip to content

Commit

Permalink
Fix building the Mac sources on 32-bits and the 10.10 SDK.
Browse files Browse the repository at this point in the history
Use a more modern approach to accessing the results of an NSOpenPanel dialog
in the FileDialogPlugin.
  • Loading branch information
eliotmiranda committed Jun 27, 2022
1 parent 3a9c70e commit 3b1355a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platforms/iOS/plugins/FileDialogPlugin/sqMacFileDialog.m
Expand Up @@ -308,8 +308,9 @@
if ((dlg->panelResponse = (int)response) == NSModalResponseOK) {
if (dlg->multiSelect) {
dlg->results = malloc((dlg->nResults = [panel.URLs count]) * sizeof(void *));
for (int i = [panel.URLs count]; --i >= 0; )
dlg->results[i] = strdup([panel.URLs[i].path UTF8String]);
int i = 0;
for (NSURL *fileURL in [panel URLs])
dlg->results[i++] = strdup([fileURL.path UTF8String]);
}
else {
dlg->nResults = 1;
Expand Down

0 comments on commit 3b1355a

Please sign in to comment.