add error messages.

This commit is contained in:
hecomi
2017-01-07 23:10:13 +09:00
parent 4a28b5f341
commit 7237d283ef
4 changed files with 4 additions and 2 deletions
@@ -97,6 +97,7 @@ void Cursor::Draw(
// Check buffers // Check buffers
if (!bgraBuffer_ || !buffer_) if (!bgraBuffer_ || !buffer_)
{ {
Debug::Error("Cursor::UpdateTexture() => no buffer.");
return; return;
} }
@@ -315,7 +315,8 @@ void Duplicator::Duplicate(UINT timeout)
return; return;
} }
auto sharedTextureWrapper = device_->GetCompatibleSharedTexture(texture, lastFrameId_ % 2); //auto sharedTextureWrapper = device_->GetCompatibleSharedTexture(texture, lastFrameId_ % 2);
auto sharedTextureWrapper = device_->GetCompatibleSharedTexture(texture, 0);
if (!sharedTextureWrapper) if (!sharedTextureWrapper)
{ {
Debug::Error("Duplicator::Duplicate() => Shared texture is null."); Debug::Error("Duplicator::Duplicate() => Shared texture is null.");
@@ -78,7 +78,7 @@ void Monitor::Render()
const auto& sharedTextureWrapper = frame.texture; const auto& sharedTextureWrapper = frame.texture;
auto sharedTexture = sharedTextureWrapper->Lock(); auto sharedTexture = sharedTextureWrapper->Lock();
if (!sharedTexture) return; if (!sharedTexture) return;
ScopedReleaser releaser([&] { sharedTextureWrapper->Unlock(); }); ScopedReleaser sharedTextureReleaser([&] { sharedTextureWrapper->Unlock(); });
if (unityTexture_) if (unityTexture_)
{ {