| 555 | } |
| 556 | |
| 557 | cc_result Window_SaveFileDialog(const struct SaveFileDialogArgs* args) { |
| 558 | FILEDLG fileDialog; |
| 559 | HWND hDialog; |
| 560 | |
| 561 | memset(&fileDialog, 0, sizeof(FILEDLG)); |
| 562 | fileDialog.cbSize = sizeof(FILEDLG); |
| 563 | fileDialog.fl = FDS_HELPBUTTON | FDS_CENTER | FDS_PRELOAD_VOLINFO | FDS_SAVEAS_DIALOG; |
| 564 | fileDialog.pszTitle = (PSZ)args->titles; |
| 565 | fileDialog.pszOKButton = NULL; |
| 566 | |
| 567 | Mem_Copy(fileDialog.szFullFile, *(args->filters), CCHMAXPATH); |
| 568 | hDialog = WinFileDlg(HWND_DESKTOP, hwndClient, &fileDialog); |
| 569 | if (fileDialog.lReturn == DID_OK) { |
| 570 | cc_string temp = String_FromRaw(fileDialog.szFullFile, CCHMAXPATH); |
| 571 | args->Callback(&temp); |
| 572 | } |
| 573 | |
| 574 | return 0; |
| 575 | } |
| 576 | |
| 577 | /* Displays on-screen keyboard for platforms that lack physical keyboard input. */ |
| 578 | /* NOTE: On desktop platforms, this won't do anything. */ |
no test coverage detected