diff options
author | Simon Clitherow <aphex@nildram.co.uk> | 2003-06-05 01:22:57 +0400 |
---|---|---|
committer | Simon Clitherow <aphex@nildram.co.uk> | 2003-06-05 01:22:57 +0400 |
commit | f40d9f57ee9654b6d90f1df4c7867073fb3f92ea (patch) | |
tree | da705515fbfead941227e1bed2178748094d2dee /source/blender/blenlib | |
parent | f28910922861843b7faa43814970d7c21986965f (diff) |
Registering .blend files now works for Windows -- hopefully!
You will need to re-register the blend files (blender.exe -R)
for the fix to come into action.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/winstuff.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 3a4491dedaa..813e2942bc9 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -57,11 +57,11 @@ int BLI_getInstallationDir( char * str ) { size = sizeof(buffer); - lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\BlenderFoundation", 0, + lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\BlenderFoundation\\Blender", 0, KEY_ALL_ACCESS, &hkey); if (lresult == ERROR_SUCCESS) { - lresult = RegQueryValueEx(hkey, "Install_Dir", 0, NULL, (LPBYTE)buffer, &size); + lresult = RegQueryValueEx(hkey, "Inst_Dir", 0, NULL, (LPBYTE)buffer, &size); strcpy(str, buffer); RegCloseKey(hkey); return 1; @@ -82,12 +82,11 @@ void RegisterBlendExtension(char * str) { strncpy(dir, str, strlen(str)-11); - lresult = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\BlenderFoundation", 0, + lresult = RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\BlenderFoundation\\Blender", 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwd); if (lresult == ERROR_SUCCESS) { - if (dwd != REG_OPENED_EXISTING_KEY) - lresult = RegSetValueEx(hkey, "Install_Dir", 0, REG_SZ, dir, strlen(dir)+1); + lresult = RegSetValueEx(hkey, "Inst_Dir", 0, REG_SZ, dir, strlen(dir)+1); RegCloseKey(hkey); } |