mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
xv: inline SWriteGetPortAttributeReply()
Instead of complex macro machinery, just move the conditional swapping directly into ProcXvGetPortAttribute(). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
71713fbf50
commit
c744d17e69
@@ -54,18 +54,6 @@ SOFTWARE.
|
|||||||
unsigned long XvXRTPort;
|
unsigned long XvXRTPort;
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
static int
|
|
||||||
SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep)
|
|
||||||
{
|
|
||||||
swaps(&rep->sequenceNumber);
|
|
||||||
swapl(&rep->length);
|
|
||||||
swapl(&rep->value);
|
|
||||||
|
|
||||||
WriteToClient(client, sz_xvGetPortAttributeReply, rep);
|
|
||||||
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep)
|
SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep)
|
||||||
{
|
{
|
||||||
@@ -121,10 +109,6 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
|
|||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _WriteGetPortAttributeReply(_c,_d) \
|
|
||||||
if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \
|
|
||||||
else WriteToClient(_c, sz_xvGetPortAttributeReply, _d)
|
|
||||||
|
|
||||||
#define _WriteQueryBestSizeReply(_c,_d) \
|
#define _WriteQueryBestSizeReply(_c,_d) \
|
||||||
if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
|
if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \
|
||||||
else WriteToClient(_c, sz_xvQueryBestSizeReply, _d)
|
else WriteToClient(_c, sz_xvQueryBestSizeReply, _d)
|
||||||
@@ -650,8 +634,13 @@ ProcXvGetPortAttribute(ClientPtr client)
|
|||||||
.value = value
|
.value = value
|
||||||
};
|
};
|
||||||
|
|
||||||
_WriteGetPortAttributeReply(client, &rep);
|
if (client->swapped) {
|
||||||
|
swaps(&rep.sequenceNumber);
|
||||||
|
swapl(&rep.length);
|
||||||
|
swapl(&rep.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
WriteToClient(client, sz_xvGetPortAttributeReply, &rep);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user