tweak code.
This commit is contained in:
@@ -84,7 +84,7 @@ private:
|
|||||||
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> dupl_;
|
Microsoft::WRL::ComPtr<IDXGIOutputDuplication> dupl_;
|
||||||
Frame lastFrame_;
|
Frame lastFrame_;
|
||||||
UINT lastFrameId_ = 0;
|
UINT lastFrameId_ = 0;
|
||||||
bool isFrameAquired_ = false;
|
bool isFrameAcquired_ = false;
|
||||||
|
|
||||||
volatile bool shouldRun_ = false;
|
volatile bool shouldRun_ = false;
|
||||||
std::thread thread_;
|
std::thread thread_;
|
||||||
|
|||||||
@@ -81,8 +81,12 @@ void Monitor::Render()
|
|||||||
if (frame.id == lastFrameId_) return;
|
if (frame.id == lastFrameId_) return;
|
||||||
lastFrameId_ = frame.id;
|
lastFrameId_ = frame.id;
|
||||||
|
|
||||||
if (unityTexture_)
|
if (unityTexture_ == nullptr)
|
||||||
{
|
{
|
||||||
|
Debug::Error("Monitor::Render() => Target texture has not been set yet..");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
D3D11_TEXTURE2D_DESC srcDesc, dstDesc;
|
D3D11_TEXTURE2D_DESC srcDesc, dstDesc;
|
||||||
frame.texture->GetDesc(&srcDesc);
|
frame.texture->GetDesc(&srcDesc);
|
||||||
unityTexture_->GetDesc(&dstDesc);
|
unityTexture_->GetDesc(&dstDesc);
|
||||||
@@ -106,7 +110,6 @@ void Monitor::Render()
|
|||||||
manager->GetCursor()->Draw(unityTexture_);
|
manager->GetCursor()->Draw(unityTexture_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (UseGetPixels())
|
if (UseGetPixels())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user