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();
|
~BaseFilterPrivate();
|
||||||
IEnumPins *pinsForDevice(const std::string &deviceId);
|
IEnumPins *pinsForDevice(const std::string &deviceId);
|
||||||
void updatePins();
|
void updatePins();
|
||||||
|
static WINBOOL enumWindowsProc(HWND handler, LPARAM userData);
|
||||||
static void serverStateChanged(void *userData,
|
static void serverStateChanged(void *userData,
|
||||||
IpcBridge::ServerState state);
|
IpcBridge::ServerState state);
|
||||||
static void frameReady(void *userData,
|
static void frameReady(void *userData,
|
||||||
|
@ -427,6 +428,15 @@ void AkVCam::BaseFilterPrivate::updatePins()
|
||||||
AkVCamDevicePinCall(path, this, setControls, controls)
|
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,
|
void AkVCam::BaseFilterPrivate::serverStateChanged(void *userData,
|
||||||
IpcBridge::ServerState state)
|
IpcBridge::ServerState state)
|
||||||
{
|
{
|
||||||
|
@ -474,14 +484,7 @@ void AkVCam::BaseFilterPrivate::devicesChanged(void *userData,
|
||||||
UNUSED(devices);
|
UNUSED(devices);
|
||||||
AkLogFunction();
|
AkLogFunction();
|
||||||
std::vector<HWND> handlers;
|
std::vector<HWND> handlers;
|
||||||
EnumWindows([] (HWND handler, LPARAM userData) -> BOOL {
|
EnumWindows(enumWindowsProc, LPARAM(&handlers));
|
||||||
auto handlers =
|
|
||||||
reinterpret_cast<std::vector<HWND> *>(userData);
|
|
||||||
handlers->push_back(handler);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
},
|
|
||||||
reinterpret_cast<LPARAM>(&handlers));
|
|
||||||
|
|
||||||
for (auto &handler: handlers)
|
for (auto &handler: handlers)
|
||||||
SendMessage(handler, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0);
|
SendMessage(handler, WM_DEVICECHANGE, DBT_DEVNODES_CHANGED, 0);
|
||||||
|
|
Loading…
Reference in a new issue