address log accumulation issue and non-ascii files load on program init
This commit is contained in:
1 parent
46690d6975
commit
5e27111b21
12 files changed
+811
-153
No files matched your search
+4
-2
@@ -55,13 +55,15 @@ namespace anm2ed
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
void Dialog::file_save(Type type)
|
||||
void Dialog::file_save(Type type, const std::filesystem::path& defaultPath)
|
||||
{
|
||||
if (type == Dialog::NONE) return;
|
||||
path.clear();
|
||||
paths.clear();
|
||||
auto defaultPathString = path::to_utf8(defaultPath);
|
||||
auto defaultPathCStr = defaultPathString.empty() ? nullptr : defaultPathString.c_str();
|
||||
SDL_ShowSaveFileDialog(callback, this, window, FILTERS[TYPE_FILTERS[type]], std::size(FILTERS[TYPE_FILTERS[type]]),
|
||||
nullptr);
|
||||
defaultPathCStr);
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user