mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[host] dxgi: remove uneeded variable + minor cosmetic changes
This commit is contained in:
parent
7321ca6768
commit
b14aad7118
@ -155,7 +155,7 @@ struct DXGIInterface
|
|||||||
int lastPointerX, lastPointerY;
|
int lastPointerX, lastPointerY;
|
||||||
bool lastPointerVisible;
|
bool lastPointerVisible;
|
||||||
|
|
||||||
struct FrameDamage frameDamage[LGMP_Q_FRAME_LEN];
|
FrameDamage frameDamage[LGMP_Q_FRAME_LEN];
|
||||||
};
|
};
|
||||||
|
|
||||||
// locals
|
// locals
|
||||||
@ -1428,14 +1428,16 @@ static CaptureResult dxgi_getFrame(FrameBuffer * frame, int frameIndex)
|
|||||||
DEBUG_ASSERT(this);
|
DEBUG_ASSERT(this);
|
||||||
DEBUG_ASSERT(this->initialized);
|
DEBUG_ASSERT(this->initialized);
|
||||||
|
|
||||||
Texture * tex = &this->texture[this->texRIndex];
|
Texture * tex = &this->texture[this->texRIndex];
|
||||||
|
FrameDamage * damage = &this->frameDamage[frameIndex];
|
||||||
|
|
||||||
struct FrameDamage * damage = this->frameDamage + frameIndex;
|
if (tex->damageRectsCount == 0 ||
|
||||||
bool damageAll = tex->damageRectsCount == 0 || damage->count < 0 ||
|
damage->count < 0 ||
|
||||||
damage->count + tex->damageRectsCount > KVMFR_MAX_DAMAGE_RECTS;
|
damage->count + tex->damageRectsCount > KVMFR_MAX_DAMAGE_RECTS)
|
||||||
|
{
|
||||||
if (damageAll)
|
// damage all
|
||||||
framebuffer_write(frame, tex->map, this->pitch * this->dataHeight);
|
framebuffer_write(frame, tex->map, this->pitch * this->dataHeight);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(damage->rects + damage->count, tex->damageRects,
|
memcpy(damage->rects + damage->count, tex->damageRects,
|
||||||
|
Loading…
Reference in New Issue
Block a user