Fix for blender.exe -r being registering blender-app.exe
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user