mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
初期ディレクトリの設定に対応
This commit is contained in:
parent
42ebfd4da7
commit
79d321544e
@ -1749,6 +1749,12 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
||||
|
||||
SetWindowText(GetDlgItem(hWnd, IDC_EDIT_INPUT_EXT_LIST), inputFileExt.c_str());
|
||||
|
||||
if (tOutputDirFix.length() > 0 && boost::filesystem::exists(tOutputDirFix))
|
||||
{
|
||||
output_dir = tOutputDirFix;
|
||||
SetWindowText(GetDlgItem(hWnd, IDC_EDIT_OUTPUT), output_dir.c_str());
|
||||
}
|
||||
|
||||
EnableWindow(GetDlgItem(dh, IDC_BUTTON_CANCEL), FALSE);
|
||||
|
||||
// 前回の拡張子設定関連を復元
|
||||
@ -2166,6 +2172,11 @@ void DialogEvent::InputRef(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpDat
|
||||
*tfp = TEXT('\0');
|
||||
tfp++;
|
||||
|
||||
if (tInputDirFix.length() > 0 && boost::filesystem::exists(tInputDirFix))
|
||||
ofn.lpstrInitialDir = tInputDirFix.c_str();
|
||||
else
|
||||
ofn.lpstrInitialDir = szPath;
|
||||
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = dh;
|
||||
ofn.lpstrFile = szFile.data();
|
||||
@ -2173,7 +2184,6 @@ void DialogEvent::InputRef(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpDat
|
||||
ofn.lpstrFilter = szFilter;
|
||||
ofn.nFilterIndex = 1;
|
||||
ofn.lpstrTitle = langStringList.GetString(L"MessageTitleInputDialog").c_str();
|
||||
ofn.lpstrInitialDir = szPath;
|
||||
ofn.lpstrCustomFilter = NULL;
|
||||
ofn.nMaxCustFilter = 0;
|
||||
ofn.lpstrFileTitle = NULL;
|
||||
@ -2264,6 +2274,11 @@ void DialogEvent::OutputRef(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpDa
|
||||
memcpy(tfp, allFilesExt.c_str(), allFilesExt.length() * sizeof(TCHAR));
|
||||
tfp += allFilesExt.length();
|
||||
|
||||
if (tOutputDirFix.length() > 0 && boost::filesystem::exists(tOutputDirFix))
|
||||
ofn.lpstrInitialDir = tOutputDirFix.c_str();
|
||||
else
|
||||
ofn.lpstrInitialDir = szPath;
|
||||
|
||||
ofn.lStructSize = sizeof(ofn);
|
||||
ofn.hwndOwner = dh;
|
||||
ofn.lpstrFile = szFile.data();
|
||||
@ -2271,7 +2286,6 @@ void DialogEvent::OutputRef(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpDa
|
||||
ofn.lpstrFilter = szFilter;
|
||||
ofn.nFilterIndex = 1;
|
||||
ofn.lpstrTitle = langStringList.GetString(L"MessageTitleInputDialog").c_str();
|
||||
ofn.lpstrInitialDir = szPath;
|
||||
ofn.lpstrCustomFilter = NULL;
|
||||
ofn.nMaxCustFilter = 0;
|
||||
ofn.lpstrFileTitle = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user