Skip to content

Commit

Permalink
Make MSVC happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
hipersayanX committed Feb 20, 2025
1 parent 65bf401 commit 7d2a6cb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions cmio/PlatformUtils/src/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ std::string AkVCam::Preferences::readString(const std::string &key,
auto value = defaultValue;

if (cfValue) {
auto len = size_t(CFStringGetLength(cfValue));
auto data = CFStringGetCStringPtr(cfValue, kCFStringEncodingUTF8);
auto len = size_t(CFStringGetLength(CFStringRef(cfValue)));
auto data = CFStringGetCStringPtr(CFStringRef(cfValue), kCFStringEncodingUTF8);

if (data) {
value = std::string(data, len);
Expand Down
10 changes: 8 additions & 2 deletions cmio/VCamIPC/src/ipcbridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,14 @@ AkVCam::Hack &AkVCam::Hack::operator =(const Hack &other)
}

#ifdef VCAMIPC_LIBRARY_SHARED
extern "C" AkVCam::IpcBridgePtr akCreateBridge()
extern "C" AkVCam::IpcBridge *akCreateBridge()
{
return std::make_shared<AkVCam::IpcBridge>();
return new AkVCam::IpcBridge;
}

extern "C" void akDestroyBridge(AkVCam::IpcBridge *bridge)
{
if (bridge)
delete AkVCam::IpcBridge;
}
#endif
18 changes: 10 additions & 8 deletions dshow/VCamIPC/src/ipcbridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,10 @@ bool AkVCam::IpcBridgePrivate::launchService()
AkLogDebug() << "Launching the service" << std::endl;
auto servicePath = locateServicePath();

if (!servicePath.empty()) {
//char cmd[4096];
//snprintf(cmd, 4096, "start /b \"\" \"%s\"", servicePath.c_str());
//system(cmd);
if (!servicePath.empty())
execDetached({servicePath});
} else {
else
AkLogDebug() << "Service path not found" << std::endl;
}
}

bool ok = false;
Expand Down Expand Up @@ -863,8 +859,14 @@ AkVCam::Hack &AkVCam::Hack::operator =(const Hack &other)
}

#ifdef VCAMIPC_LIBRARY_SHARED
extern "C" AkVCam::IpcBridgePtr akCreateBridge()
extern "C" AkVCam::IpcBridge *akCreateBridge()
{
return new AkVCam::IpcBridge;
}

extern "C" void akDestroyBridge(AkVCam::IpcBridge *bridge)
{
return std::make_shared<AkVCam::IpcBridge>();
if (bridge)
delete AkVCam::IpcBridge;
}
#endif

0 comments on commit 7d2a6cb

Please sign in to comment.