mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xv: inline SWriteListImageFormatsReply()
Instead of complex macro machinery, just move the conditional swapping directly into ProcXvListImageFormats (). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
a3de7f5c57
commit
c8c52387c5
@@ -54,22 +54,6 @@ SOFTWARE.
|
||||
unsigned long XvXRTPort;
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int
|
||||
SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
swapl(&rep->num_formats);
|
||||
|
||||
WriteToClient(client, sz_xvListImageFormatsReply, rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
#define _WriteListImageFormatsReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvListImageFormatsReply, _d)
|
||||
|
||||
static int
|
||||
ProcXvQueryExtension(ClientPtr client)
|
||||
{
|
||||
@@ -946,7 +930,13 @@ ProcXvListImageFormats(ClientPtr client)
|
||||
bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo)
|
||||
};
|
||||
|
||||
_WriteListImageFormatsReply(client, &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.num_formats);
|
||||
}
|
||||
|
||||
WriteToClient(client, sz_xvListImageFormatsReply, &rep);
|
||||
|
||||
pImage = pPort->pAdaptor->pImages;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user