File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Plugins/uWindowCapture/uWindowCapture Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ WindowTexture::WindowTexture(Window* window)
1818{
1919 if (window_->IsDesktop ())
2020 {
21- captureMode_ = CaptureMode::Auto;
2221 windowsGraphicsCapture_ = std::make_shared<WindowsGraphicsCapture>(window_->GetMonitorHandle ());
2322 }
2423 else if (window_->IsAltTab ())
@@ -199,12 +198,6 @@ bool WindowTexture::CaptureByWin32API()
199198 dpiScaleX_ = std::fmax (static_cast <float >(window_->GetWidth ()) / dcWidth, 0 .01f );
200199 dpiScaleY_ = std::fmax (static_cast <float >(window_->GetHeight ()) / dcHeight, 0 .01f );
201200
202- // Use BitBlt when the target is a Desktop
203- if (window_->IsDesktop ())
204- {
205- captureMode_ = CaptureMode::BitBlt;
206- }
207-
208201 if (GetCaptureModeInternal () == CaptureMode::BitBlt && !window_->IsDesktop ())
209202 {
210203 // Remove frame areas
@@ -410,6 +403,8 @@ void WindowTexture::DrawCursorByWin32API(HWND hWnd, HDC hDcMem)
410403
411404bool WindowTexture::CaptureByWindowsGraphicsCapture ()
412405{
406+ if (!windowsGraphicsCapture_) return false ;
407+
413408 if (!windowsGraphicsCapture_->IsStarted ())
414409 {
415410 windowsGraphicsCapture_->Start ();
You can’t perform that action at this time.
0 commit comments