mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] dxgi: dont alter the damage rect array when scaling
This commit is contained in:
parent
f8586fd063
commit
a455078e0f
@ -1244,16 +1244,16 @@ static CaptureResult dxgi_capture(void)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < tex->texDamageCount; ++i)
|
for (int i = 0; i < tex->texDamageCount; ++i)
|
||||||
{
|
{
|
||||||
FrameDamageRect * rect = &tex->texDamageRects[i];
|
FrameDamageRect rect = tex->texDamageRects[i];
|
||||||
|
|
||||||
// correct the damage rect for BGR packed data
|
// correct the damage rect for BGR packed data
|
||||||
if (this->outputFormat == CAPTURE_FMT_BGR)
|
if (this->outputFormat == CAPTURE_FMT_BGR)
|
||||||
{
|
{
|
||||||
rect->x = (rect->x * 3 ) / 4; // round down
|
rect.x = (rect.x * 3 ) / 4; // round down
|
||||||
rect->width = (rect->width * 3 + 3) / 4; // round up
|
rect.width = (rect.width * 3 + 3) / 4; // round up
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->backend->copyRect(dst, this->texWIndex, rect))
|
if (!this->backend->copyRect(dst, this->texWIndex, &rect))
|
||||||
{
|
{
|
||||||
result = CAPTURE_RESULT_ERROR;
|
result = CAPTURE_RESULT_ERROR;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user