diff --git a/Xi/extinit.c b/Xi/extinit.c index ba99c99bc..c62a34044 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -465,7 +465,7 @@ SProcIDispatch(ClientPtr client) case X_SetDeviceValuators: return ProcXSetDeviceValuators(client); case X_GetDeviceControl: - return SProcXGetDeviceControl(client); + return ProcXGetDeviceControl(client); case X_ChangeDeviceControl: return SProcXChangeDeviceControl(client); /* XI 1.5 */ diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 4b41d88d3..a73d74105 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -44,12 +44,6 @@ SOFTWARE. ********************************************************/ -/******************************************************************** - * - * Get Device control attributes for an extension device. - * - */ - #include #include @@ -62,28 +56,6 @@ SOFTWARE. #include "exglobals.h" #include "getdctl.h" -/*********************************************************************** - * - * This procedure gets the control attributes for an extension device, - * for clients on machines with a different byte ordering than the server. - * - */ - -int _X_COLD -SProcXGetDeviceControl(ClientPtr client) -{ - REQUEST(xGetDeviceControlReq); - REQUEST_SIZE_MATCH(xGetDeviceControlReq); - swaps(&stuff->control); - return (ProcXGetDeviceControl(client)); -} - -/*********************************************************************** - * - * This procedure copies DeviceResolution data, swapping if necessary. - * - */ - static void _writeDeviceResolution(ClientPtr client, ValuatorClassPtr v, x_rpcbuf_t *rpcbuf) { @@ -146,6 +118,9 @@ ProcXGetDeviceControl(ClientPtr client) x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE }; + if (rpcbuf.swapped) + swaps(&stuff->control); + switch (stuff->control) { case DEVICE_RESOLUTION: if (!dev->valuator) diff --git a/Xi/getdctl.h b/Xi/getdctl.h index 2552958c3..10d446ca7 100644 --- a/Xi/getdctl.h +++ b/Xi/getdctl.h @@ -25,9 +25,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef GETDCTL_H #define GETDCTL_H 1 -int SProcXGetDeviceControl(ClientPtr /* client */ - ); - int ProcXGetDeviceControl(ClientPtr /* client */ );