Fix compatibility with old compiler versions.
This commit is contained in:
parent
6e154a7f49
commit
26a4175e70
1 changed files with 11 additions and 8 deletions
|
@ -71,6 +71,7 @@ namespace AkVCam
|
|||
~BaseFilterPrivate();
|
||||
IEnumPins *pinsForDevice(const std::string &deviceId);
|
||||
void updatePins();
|
||||
static WINBOOL enumWindowsProc(HWND handler, LPARAM userData);
|
||||
static void serverStateChanged(void *userData,
|
||||
IpcBridge::ServerState state);
|
||||
static void frameReady(void *userData,
|
||||
|
@ -427,6 +428,15 @@ void AkVCam::BaseFilterPrivate::updatePins()
|
|||
AkVCamDevicePinCall(path, this, setControls, controls)
|
||||
}
|
||||
|
||||
WINBOOL AkVCam::BaseFilterPrivate::enumWindowsProc(HWND handler,
|
||||
LPARAM userData)
|
||||
{
|
||||
auto handlers = reinterpret_cast<std::vector<HWND> *>(userData);
|
||||
handlers->push_back(handler);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void AkVCam::BaseFilterPrivate::serverStateChanged(void *userData,
|
||||
IpcBridge::ServerState state)
|
||||
{
|
||||
|
@ -474,14 +484,7 @@ void AkVCam::BaseFilterPrivate::devicesChanged(void *userData,
|
|||
UNUSED(devices);
|
||||
AkLogFunction();
|
||||
std::vector<HWND> handlers;
|
||||
EnumWindows([] (HWND handler, LPARAM userData) -> BOOL {
|
||||
auto handlers =
|
||||
reinterpret_cast<std::vector<HWND> *>(userData);
|
||||
handlers->push_back(handler);
|
||||
|
||||
return TRUE;
|
||||
},
|
||||
reinterpret_cast<LPARAM>(&handlers));
|
||||
EnumWindows(enumWindowsProc, LPARAM(&handlers));
|
||||
|
||||
for (auto &handler: handlers)
|
||||
SendMessage(handler, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0);
|
||||
|
|
Loading…
Reference in a new issue