Skip to content

Commit 1af72c5

Browse files
committed
fix(registry): prefer HKCU on read while keeping HKLM+HKCU writes
1 parent 4f4d124 commit 1af72c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Core/Libraries/Source/WWVegas/WWDownload/registry.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ bool SetStringInRegistry( std::string path, std::string key, std::string val)
154154
#endif
155155
fullPath.append(path);
156156

157+
if (setStringInRegistry( HKEY_LOCAL_MACHINE, fullPath, key, val))
158+
return true;
159+
157160
return setStringInRegistry( HKEY_CURRENT_USER, fullPath, key, val );
158161
}
159162

@@ -166,6 +169,9 @@ bool SetUnsignedIntInRegistry( std::string path, std::string key, unsigned int v
166169
#endif
167170
fullPath.append(path);
168171

172+
if (setUnsignedIntInRegistry( HKEY_LOCAL_MACHINE, fullPath, key, val))
173+
return true;
174+
169175
return setUnsignedIntInRegistry( HKEY_CURRENT_USER, fullPath, key, val );
170176
}
171177

0 commit comments

Comments
 (0)