diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-09-21 00:44:48 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-09-21 00:45:50 +0300 |
commit | 88f4e811242e1abd2a1577dcc8486bba73edfc4f (patch) | |
tree | 10ac9f1bd3f1b34ac96072db746752ecca569cce /utils/winmm_drv | |
parent | f95e5ff580b68b13ba308fd54e1c95d4197ad863 (diff) | |
download | libADLMIDI-88f4e811242e1abd2a1577dcc8486bba73edfc4f.tar.gz libADLMIDI-88f4e811242e1abd2a1577dcc8486bba73edfc4f.tar.bz2 libADLMIDI-88f4e811242e1abd2a1577dcc8486bba73edfc4f.zip |
WinMM-DRV: Don't write a blank path line into registry
Diffstat (limited to 'utils/winmm_drv')
-rw-r--r-- | utils/winmm_drv/config/regconfig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/winmm_drv/config/regconfig.c b/utils/winmm_drv/config/regconfig.c index 517bab8..275b930 100644 --- a/utils/winmm_drv/config/regconfig.c +++ b/utils/winmm_drv/config/regconfig.c @@ -123,7 +123,7 @@ void setupDefault(DriverSettings *setup) { setup->useExternalBank = 0; setup->bankId = 68; - ZeroMemory(setup->bankPath, sizeof(setup->bankPath)); + ZeroMemory(setup->bankPath, MAX_PATH * sizeof(WCHAR)); setup->emulatorId = 0; setup->flagDeepTremolo = BST_INDETERMINATE; @@ -192,8 +192,8 @@ void saveSetup(DriverSettings *setup) createRegistryKey(HKEY_CURRENT_USER, s_regPath); writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"useExternalBank", setup->useExternalBank); writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"bankId", setup->bankId); - writeStringToRegistry(HKEY_CURRENT_USER, s_regPath, L"bankPath", setup->bankPath); - + if(setup->bankPath[0] != L'\0') + writeStringToRegistry(HKEY_CURRENT_USER, s_regPath, L"bankPath", setup->bankPath); writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"emulatorId", setup->emulatorId); writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"flagDeepTremolo", setup->flagDeepTremolo); |