Revert "randr: ProcRRGetMonitors() use SwapLongs instead of callbacks"
This reverts commit 203f59c6d3.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2012>
This commit is contained in:
parent
a205917752
commit
9b753c3970
|
|
@ -622,6 +622,8 @@ ProcRRGetMonitors(ClientPtr client)
|
||||||
}
|
}
|
||||||
WriteToClient(client, sizeof(xRRGetMonitorsReply), &rep);
|
WriteToClient(client, sizeof(xRRGetMonitorsReply), &rep);
|
||||||
|
|
||||||
|
client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write;
|
||||||
|
|
||||||
for (m = 0; m < nmonitors; m++) {
|
for (m = 0; m < nmonitors; m++) {
|
||||||
RRMonitorPtr monitor = &monitors[m];
|
RRMonitorPtr monitor = &monitors[m];
|
||||||
xRRMonitorInfo info = {
|
xRRMonitorInfo info = {
|
||||||
|
|
@ -647,14 +649,8 @@ ProcRRGetMonitors(ClientPtr client)
|
||||||
swapl(&info.heightInMillimeters);
|
swapl(&info.heightInMillimeters);
|
||||||
}
|
}
|
||||||
|
|
||||||
RROutput outputs[monitor->numOutputs];
|
|
||||||
memcpy(outputs, monitor->outputs, monitor->numOutputs * sizeof (RROutput));
|
|
||||||
|
|
||||||
if (client->swapped)
|
|
||||||
SwapLongs(outputs, monitor->numOutputs);
|
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xRRMonitorInfo), &info);
|
WriteToClient(client, sizeof(xRRMonitorInfo), &info);
|
||||||
WriteToClient(client, sizeof(outputs), outputs);
|
WriteSwappedDataToClient(client, monitor->numOutputs * sizeof (RROutput), monitor->outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
RRMonitorFreeList(monitors, nmonitors);
|
RRMonitorFreeList(monitors, nmonitors);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue