diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-29 15:36:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-08-29 15:36:59 +0400 |
commit | cb7d430c191b1c22b54637f1589cec56bdd25615 (patch) | |
tree | 590d65f64036ff455b47598a534348b659186fa0 /source | |
parent | d438208474e7d5a2dce6125f3fa727f3a93eb087 (diff) |
Fix for blender.exe -r being registering blender-app.exe
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/winstuff.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 65ded37eb7b..a67e116969e 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -92,6 +92,7 @@ void RegisterBlendExtension(void) const char *ThumbHandlerDLL; char RegCmd[MAX_PATH * 2]; char MBox[256]; + char *blender_app; #ifndef WIN64 BOOL IsWOW64; #endif @@ -99,6 +100,12 @@ void RegisterBlendExtension(void) printf("Registering file extension..."); GetModuleFileName(0, BlPath, MAX_PATH); + /* Replace the actual app name with the wrapper. */ + blender_app = strstr(BlPath, "blender-app.exe"); + if (blender_app != NULL) { + strcpy(blender_app, "blender.exe"); + } + /* root is HKLM by default */ lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Classes", 0, KEY_ALL_ACCESS, &root); if (lresult != ERROR_SUCCESS) { |