summaryrefslogtreecommitdiff
path: root/plugins/SplashScreen/src/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SplashScreen/src/options.cpp')
-rw-r--r--plugins/SplashScreen/src/options.cpp32
1 files changed, 14 insertions, 18 deletions
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp
index 156974c7ed..ddbaadc001 100644
--- a/plugins/SplashScreen/src/options.cpp
+++ b/plugins/SplashScreen/src/options.cpp
@@ -68,37 +68,33 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
ReadDbConfig();
TCHAR inBuf[80];
DBVARIANT dbv = {0};
- db_get_ts(NULL, MODNAME, "Path", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ if (!db_get_ts(NULL, MODNAME, "Path", &dbv))
{
- _tcscpy_s(inBuf, _T("splash\\splash.png"));
+ _tcscpy_s(inBuf, dbv.ptszVal);
db_free(&dbv);
}
else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SPLASHPATH),inBuf);
- db_get_ts(NULL, MODNAME, "Sound", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ _tcscpy_s(inBuf, _T("splash\\splash.png"));
+ SetDlgItemText(hwndDlg, IDC_SPLASHPATH, inBuf);
+
+ if (!db_get_ts(NULL, MODNAME, "Sound", &dbv))
{
- _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
+ _tcscpy_s(inBuf, dbv.ptszVal);
db_free(&dbv);
}
else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),inBuf);
+ _tcscpy_s(inBuf, _T("sounds\\startup.wav"));
+ SetDlgItemText(hwndDlg, IDC_SNDPATH, inBuf);
- db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv);
- if (lstrcmp(dbv.ptszVal, NULL) == 0)
+ if (!db_get_ts(NULL, MODNAME, "VersionPrefix", &dbv))
{
- _tcscpy_s(inBuf, _T(""));
+ _tcscpy_s(inBuf, dbv.ptszVal);
db_free(&dbv);
}
else
- _tcscpy_s(inBuf, dbv.ptszVal);
- dbv.ptszVal = NULL;
- SetWindowText(GetDlgItem(hwndDlg, IDC_VERSIONPREFIX), inBuf);
+ _tcscpy_s(inBuf, _T(""));
+ SetDlgItemText(hwndDlg, IDC_VERSIONPREFIX, inBuf);
+
if (options.active)
CheckDlgButton(hwndDlg, IDC_ACTIVE, BST_CHECKED);
if (options.playsnd && !options.inheritGS)