rdp: Apply scale in context resets at activation time

Scale is currently always 1, but we can do this safely now to prepare for
when it isn't.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-08-09 08:18:35 -05:00 committed by Daniel Stone
parent bacae46632
commit 3e27571001

View File

@ -987,6 +987,7 @@ xf_peer_activate(freerdp_peer* client)
struct weston_output *weston_output; struct weston_output *weston_output;
char seat_name[50]; char seat_name[50];
POINTER_SYSTEM_UPDATE pointer_system; POINTER_SYSTEM_UPDATE pointer_system;
int width, height;
peerCtx = (RdpPeerContext *)client->context; peerCtx = (RdpPeerContext *)client->context;
b = peerCtx->rdpBackend; b = peerCtx->rdpBackend;
@ -1050,8 +1051,10 @@ xf_peer_activate(freerdp_peer* client)
} }
weston_output = &output->base; weston_output = &output->base;
rfx_context_reset(peerCtx->rfx_context, weston_output->width, weston_output->height); width = weston_output->width * weston_output->scale;
nsc_context_reset(peerCtx->nsc_context, weston_output->width, weston_output->height); height = weston_output->height * weston_output->scale;
rfx_context_reset(peerCtx->rfx_context, width, height);
nsc_context_reset(peerCtx->nsc_context, width, height);
if (peersItem->flags & RDP_PEER_ACTIVATED) if (peersItem->flags & RDP_PEER_ACTIVATED)
return TRUE; return TRUE;