mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix #3010: extension not added on native save file dialog
This commit is contained in:
parent
669c15cbaf
commit
c8015cab92
|
@ -635,6 +635,10 @@ int platform_open_common_file_dialog(filedialog_type type, utf8 *title, utf8 *fi
|
|||
// Open dialog
|
||||
commonFlags = OFN_EXPLORER | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
|
||||
if (type == FD_SAVE) {
|
||||
wchar_t *defaultExtension = wcsrchr(wcfilterPattern, '.');
|
||||
if (defaultExtension != NULL) {
|
||||
openFileName.lpstrDefExt = defaultExtension + 1;
|
||||
}
|
||||
openFileName.Flags = commonFlags | OFN_CREATEPROMPT | OFN_OVERWRITEPROMPT;
|
||||
result = GetSaveFileNameW(&openFileName);
|
||||
} else if (type == FD_OPEN) {
|
||||
|
|
Loading…
Reference in New Issue