]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 30 Nov 2011 17:57:14 +0000 (17:57 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 30 Nov 2011 17:57:14 +0000 (17:57 +0000)
modules/bluefish/util/blue_velvet.cpp

index a651ae1d46a6e2db9fb8e5798d64b50cd56819aa..4d761ff455c0bce96ff1d0ac63a599c8a0350765 100644 (file)
@@ -21,13 +21,12 @@ void blue_velvet_initialize()
 #else\r
        std::string module_str = "BlueVelvet3.dll";\r
 #endif\r
-       std::string sys_drive = getenv("SystemDrive");\r
 \r
        auto module = LoadLibrary(widen(module_str).c_str());\r
        if(!module)\r
-               LoadLibrary(widen(sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
+               LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
        if(!module)\r
-               LoadLibrary(widen(sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
+               LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
        if(!module)\r
                BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueVelvet3.dll. Required drivers are not installed."));\r
        static std::shared_ptr<void> lib(module, FreeLibrary);\r
@@ -43,14 +42,12 @@ void blue_hanc_initialize()
 #else\r
        std::string module_str = "BlueHancUtils.dll";\r
 #endif\r
-\r
-       std::string sys_drive = getenv("SystemDrive");\r
-\r
+       \r
        auto module = LoadLibrary(widen(module_str).c_str());\r
        if(!module)\r
-               LoadLibrary(widen(sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
+               LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str());\r
        if(!module)\r
-               LoadLibrary(widen(sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
+               LoadLibrary(widen(std::string(getenv("SystemDrive")) + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str());\r
        if(!module)\r
                BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueHancUtils.dll. Required drivers are not installed."));\r
        static std::shared_ptr<void> lib(module, FreeLibrary);\r