mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xv: inline SWriteQueryBestSizeReply()
Instead of complex macro machinery, just move the conditional swapping directly into ProcXvQueryBestSize(). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
c744d17e69
commit
199e049b95
@@ -54,19 +54,6 @@ SOFTWARE.
|
||||
unsigned long XvXRTPort;
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int
|
||||
SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
swaps(&rep->actual_width);
|
||||
swaps(&rep->actual_height);
|
||||
|
||||
WriteToClient(client, sz_xvQueryBestSizeReply, rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
SWriteQueryPortAttributesReply(ClientPtr client,
|
||||
xvQueryPortAttributesReply * rep)
|
||||
@@ -109,10 +96,6 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
|
||||
return Success;
|
||||
}
|
||||
|
||||
#define _WriteQueryBestSizeReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvQueryBestSizeReply, _d)
|
||||
|
||||
#define _WriteQueryPortAttributesReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvQueryPortAttributesReply, _d)
|
||||
@@ -667,8 +650,14 @@ ProcXvQueryBestSize(ClientPtr client)
|
||||
.actual_height = actual_height
|
||||
};
|
||||
|
||||
_WriteQueryBestSizeReply(client, &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.actual_width);
|
||||
swaps(&rep.actual_height);
|
||||
}
|
||||
|
||||
WriteToClient(client, sz_xvQueryBestSizeReply, &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user