diff --git a/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp b/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp index aac77ae..71ffed6 100644 --- a/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp +++ b/src/plugins/multimedia/ffmpeg/qwincapturablewindows.cpp @@ -42,11 +42,7 @@ static QString windowTitle(HWND hwnd) { return QString::fromStdWString(buffer); } -QList QWinCapturableWindows::windows() const -{ - QList result; - - auto windowHandler = [](HWND hwnd, LPARAM lParam) { +static int __stdcall windowHandler(HWND hwnd, LPARAM lParam) { if (!canCaptureWindow(hwnd)) return TRUE; // Ignore window and continue enumerating @@ -58,7 +54,11 @@ QList QWinCapturableWindows::windows() const windows.push_back(windowData.release()->create()); return TRUE; - }; +} + +QList QWinCapturableWindows::windows() const +{ + QList result; ::EnumWindows(windowHandler, reinterpret_cast(&result));