Fixed generation of default NVR path, should fix the NVR path across configuration file loads.
This commit is contained in:
4
src/pc.c
4
src/pc.c
@@ -926,9 +926,9 @@ void loadconfig(wchar_t *fn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(nvr_path, 0, 2048);
|
memset(nvr_path, 0, 2048);
|
||||||
wp = (wchar_t *)config_get_wstring(NULL, "nvr_path", L"nvr");
|
wp = (wchar_t *)config_get_wstring(NULL, "nvr_path", L"");
|
||||||
if (wp) {
|
if (wp) {
|
||||||
if (wcslen(wp) <= 992) wcscpy(nvr_path, wp);
|
if (wcslen(wp) && (wcslen(wp) <= 992)) wcscpy(nvr_path, wp);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
append_filename_w(nvr_path, pcempath, L"nvr", 511);
|
append_filename_w(nvr_path, pcempath, L"nvr", 511);
|
||||||
|
|||||||
@@ -1851,6 +1851,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||||||
{
|
{
|
||||||
config_save(config_file_default);
|
config_save(config_file_default);
|
||||||
loadconfig(wopenfilestring);
|
loadconfig(wopenfilestring);
|
||||||
|
pclog_w(L"NVR path: %s\n", nvr_path);
|
||||||
mem_resize();
|
mem_resize();
|
||||||
loadbios();
|
loadbios();
|
||||||
resetpchard();
|
resetpchard();
|
||||||
|
|||||||
Reference in New Issue
Block a user