diff --git a/project/src/ui/FileDialog.cpp b/project/src/ui/FileDialog.cpp index d3b745ad0..e0b2eac26 100644 --- a/project/src/ui/FileDialog.cpp +++ b/project/src/ui/FileDialog.cpp @@ -163,11 +163,12 @@ namespace lime { std::wstring* FileDialog::SaveFile (std::wstring* filter, std::wstring* defaultPath) { - // TODO: Filters - #ifdef HX_WINDOWS - const wchar_t* path = tinyfd_saveFileDialogW (L"", defaultPath ? defaultPath->c_str () : 0, 0, NULL, NULL); + std::wstring temp (L"*."); + const wchar_t* filters[] = {filter ? (temp + *filter).c_str () : NULL}; + + const wchar_t* path = tinyfd_saveFileDialogW (L"", defaultPath ? defaultPath->c_str () : 0, filter ? 1 : 0, filter ? filters : NULL, NULL); if (path) { @@ -178,6 +179,8 @@ namespace lime { #else + // TODO: Filters + char* _defaultPath = 0; if (defaultPath) { @@ -207,4 +210,4 @@ namespace lime { } -} \ No newline at end of file +}