|
|
@@ -7,7 +7,7 @@
|
|
|
winrt::Windows::System::DispatcherQueue* WgcCapturer::queuePtr = nullptr;
|
|
|
winrt::Windows::UI::Composition::ContainerVisual* WgcCapturer::rootPtr = nullptr;
|
|
|
std::list<WgcCapturer*> WgcCapturer::_capturers;
|
|
|
-QWidget* __widget = nullptr;
|
|
|
+// QWidget* __widget = nullptr;
|
|
|
|
|
|
void WgcCapturer::Init()
|
|
|
{
|
|
|
@@ -20,14 +20,14 @@ void WgcCapturer::Init()
|
|
|
static auto controller = CreateDispatcherQueueController();
|
|
|
// Initialize Composition
|
|
|
static auto compositor = Compositor();
|
|
|
- __widget = new QWidget;
|
|
|
- __widget->hide();
|
|
|
+ // __widget = new QWidget;
|
|
|
+ // __widget->hide();
|
|
|
// __widget->resize(800, 600);
|
|
|
// __widget->show();
|
|
|
- static auto target = CreateDesktopWindowTarget(compositor, (HWND)__widget->winId());
|
|
|
+ // static auto target = CreateDesktopWindowTarget(compositor, (HWND)__widget->winId());
|
|
|
static auto root = compositor.CreateContainerVisual();
|
|
|
root.RelativeSizeAdjustment({1.0f, 1.0f});
|
|
|
- target.Root(root);
|
|
|
+ // target.Root(root);
|
|
|
|
|
|
// Enqueue our capture work on the dispatcher
|
|
|
static auto queue = controller.DispatcherQueue();
|
|
|
@@ -39,7 +39,7 @@ void WgcCapturer::Init()
|
|
|
|
|
|
void WgcCapturer::Uninit()
|
|
|
{
|
|
|
- delete __widget;
|
|
|
+ // delete __widget;
|
|
|
while (!_capturers.empty()) {
|
|
|
delete *_capturers.begin();
|
|
|
_capturers.erase(_capturers.begin());
|