From bddafe4001734e002b73923675db41bfa8d82f68 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 11 Jun 2025 13:38:23 -0700 Subject: [PATCH] Revert "randr: ProcRRGetCrtcGamma(): use SwapShort()/SwapLong()" This reverts commit d9863f7cb0f669e5c0943b6038a656ce34b8ea55. Part-of: --- randr/rrcrtc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 4eaded726..75ae0eea5 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -1676,16 +1676,13 @@ ProcRRGetCrtcGamma(ClientPtr client) swapl(&reply.length); swaps(&reply.size); } + WriteToClient(client, sizeof(xRRGetCrtcGammaReply), &reply); if (crtc->gammaSize) { memcpy(extra, crtc->gammaRed, len); - if (client->swapped) - SwapShorts((short*)extra, len/sizeof(CARD16)); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; + WriteSwappedDataToClient(client, len, extra); + free(extra); } - - WriteToClient(client, sizeof(xRRGetCrtcGammaReply), &reply); - WriteToClient(client, len, extra); - free(extra); - return Success; }