mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 05:32:47 +00:00
GUIの縦横サイズ指定の設定保存実装
This commit is contained in:
parent
86e5156a9d
commit
4a0d4b40b4
@ -995,6 +995,7 @@ void DialogEvent::SaveIni(const bool isSyncMember)
|
||||
tstring tScaleRatio;
|
||||
tstring tScaleWidth;
|
||||
tstring tScaleHeight;
|
||||
tstring tScaleWidthHeight;
|
||||
tstring tmode;
|
||||
tstring tScaleMode;
|
||||
tstring tprcess;
|
||||
@ -1014,6 +1015,11 @@ void DialogEvent::SaveIni(const bool isSyncMember)
|
||||
else
|
||||
tScaleHeight = TEXT("");
|
||||
|
||||
if (scale_width > 0 && scale_height > 0)
|
||||
tScaleWidthHeight = to_tstring(scale_width) + TEXT("x") + to_tstring(scale_height);
|
||||
else
|
||||
tScaleWidthHeight = TEXT("");
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case Waifu2x::eWaifu2xModelTypeNoise:
|
||||
@ -1055,6 +1061,8 @@ void DialogEvent::SaveIni(const bool isSyncMember)
|
||||
|
||||
WritePrivateProfileString(TEXT("Setting"), TEXT("LastScaleHeight"), tScaleHeight.c_str(), getTString(SettingFilePath).c_str());
|
||||
|
||||
WritePrivateProfileString(TEXT("Setting"), TEXT("LastScaleWidthHeight"), tScaleWidthHeight.c_str(), getTString(SettingFilePath).c_str());
|
||||
|
||||
WritePrivateProfileString(TEXT("Setting"), TEXT("LastOutputExt"), outputExt.c_str(), getTString(SettingFilePath).c_str());
|
||||
|
||||
WritePrivateProfileString(TEXT("Setting"), TEXT("LastInputFileExt"), inputFileExt.c_str(), getTString(SettingFilePath).c_str());
|
||||
@ -1813,6 +1821,10 @@ void DialogEvent::Create(HWND hWnd, WPARAM wParam, LPARAM lParam, LPVOID lpData)
|
||||
tmp[_countof(tmp) - 1] = TEXT('\0');
|
||||
tScaleHeight = tmp;
|
||||
|
||||
GetPrivateProfileString(TEXT("Setting"), TEXT("LastScaleWidthHeight"), TEXT("0"), tmp, _countof(tmp), getTString(SettingFilePath).c_str());
|
||||
tmp[_countof(tmp) - 1] = TEXT('\0');
|
||||
tScaleWidthHeight = tmp;
|
||||
|
||||
GetPrivateProfileString(TEXT("Setting"), TEXT("LastScaleMode"), TEXT("Ratio"), tmp, _countof(tmp), getTString(SettingFilePath).c_str());
|
||||
tmp[_countof(tmp) - 1] = TEXT('\0');
|
||||
tScaleMode = tmp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user