X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fbluefish%2Futil%2Fblue_velvet.cpp;h=afc81cb9d18e8fc6dbd3d394374a82c04946723d;hb=ea06a42d57994227ba5d9f99e9b479655406fdbd;hp=ae938082fac4a7d9afc2dc445dffa9c17363b59d;hpb=dbccd565a7853819239523b89f11f17756c87763;p=casparcg diff --git a/modules/bluefish/util/blue_velvet.cpp b/modules/bluefish/util/blue_velvet.cpp index ae938082f..afc81cb9d 100644 --- a/modules/bluefish/util/blue_velvet.cpp +++ b/modules/bluefish/util/blue_velvet.cpp @@ -17,10 +17,17 @@ BLUE_UINT32 (*encode_hanc_frame_ex)(BLUE_UINT32 card_type, struct hanc_stream_in void blue_velvet_initialize() { #ifdef _DEBUG - auto module = LoadLibrary(L"BlueVelvet3_d.dll"); + std::string module_str = "BlueVelvet3_d.dll"; #else - auto module = LoadLibrary(L"BlueVelvet3.dll"); + std::string module_str = "BlueVelvet3.dll"; #endif + std::string sys_drive = getenv("SystemDrive"); + + auto module = LoadLibraryA(module_str.c_str()); + if(!module) + LoadLibraryA((sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str()); + if(!module) + LoadLibraryA((sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str()); if(!module) BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueVelvet3.dll. Required drivers are not installed.")); static std::shared_ptr lib(module, FreeLibrary); @@ -32,10 +39,18 @@ void blue_velvet_initialize() void blue_hanc_initialize() { #ifdef _DEBUG - auto module = LoadLibrary(L"BlueHancUtils_d.dll"); + std::string module_str = "BlueHancUtils_d.dll"; #else - auto module = LoadLibrary(L"BlueHancUtils.dll"); + std::string module_str = "BlueHancUtils.dll"; #endif + + std::string sys_drive = getenv("SystemDrive"); + + auto module = LoadLibraryA(module_str.c_str()); + if(!module) + LoadLibraryA((sys_drive + "\\Program Files\\Bluefish444\\Driver\\" + module_str).c_str()); + if(!module) + LoadLibraryA((sys_drive + "\\Program Files (x86)\\BlueFish444\\Driver\\" + module_str).c_str()); if(!module) BOOST_THROW_EXCEPTION(file_not_found() << msg_info("Could not find BlueHancUtils.dll. Required drivers are not installed.")); static std::shared_ptr lib(module, FreeLibrary); @@ -45,8 +60,8 @@ void blue_hanc_initialize() void blue_initialize() { - blue_velvet_initialize(); blue_hanc_initialize(); + blue_velvet_initialize(); } EVideoMode vid_fmt_from_video_format(const core::video_format::type& fmt)