Xext: vidmode: ProcVidModeGetMonitor() simplify swapping/writing
We can simply call SwapLongs() before writing out the CARD32 arrays. No need using for complicated call back logic. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
b82ac7b08f
commit
09588278e3
|
@ -41,7 +41,6 @@ from Kaleb S. KEITHLEY
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
#include "servermd.h"
|
#include "servermd.h"
|
||||||
#include "swaprep.h"
|
|
||||||
#include "vidmodestr.h"
|
#include "vidmodestr.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
|
@ -1277,11 +1276,12 @@ ProcVidModeGetMonitor(ClientPtr client)
|
||||||
if (client->swapped) {
|
if (client->swapped) {
|
||||||
swaps(&rep.sequenceNumber);
|
swaps(&rep.sequenceNumber);
|
||||||
swapl(&rep.length);
|
swapl(&rep.length);
|
||||||
|
SwapLongs(hsyncdata, sizeof(hsyncdata));
|
||||||
|
SwapLongs(vsyncdata, sizeof(vsyncdata));
|
||||||
}
|
}
|
||||||
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), &rep);
|
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), &rep);
|
||||||
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
|
WriteToClient(client, sizeof(hsyncdata), hsyncdata);
|
||||||
WriteSwappedDataToClient(client, nHsync * sizeof(CARD32), hsyncdata);
|
WriteToClient(client, sizeof(vsyncdata), vsyncdata);
|
||||||
WriteSwappedDataToClient(client, nVrefresh * sizeof(CARD32), vsyncdata);
|
|
||||||
if (rep.vendorLength)
|
if (rep.vendorLength)
|
||||||
WriteToClient(client, rep.vendorLength,
|
WriteToClient(client, rep.vendorLength,
|
||||||
(pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr);
|
(pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr);
|
||||||
|
|
Loading…
Reference in New Issue