dix: Make InitCoreDevices() failures more verbose.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
5794bdd528
commit
d0c5d205a9
|
@ -709,17 +709,32 @@ CorePointerProc(DeviceIntPtr pDev, int what)
|
||||||
void
|
void
|
||||||
InitCoreDevices(void)
|
InitCoreDevices(void)
|
||||||
{
|
{
|
||||||
if (AllocDevicePair(serverClient, "Virtual core",
|
int result;
|
||||||
&inputInfo.pointer, &inputInfo.keyboard,
|
|
||||||
CorePointerProc, CoreKeyboardProc, TRUE) != Success)
|
|
||||||
FatalError("Failed to allocate core devices");
|
|
||||||
|
|
||||||
if (ActivateDevice(inputInfo.pointer, TRUE) != Success ||
|
result = AllocDevicePair(serverClient, "Virtual core",
|
||||||
ActivateDevice(inputInfo.keyboard, TRUE) != Success)
|
&inputInfo.pointer, &inputInfo.keyboard,
|
||||||
FatalError("Failed to activate core devices.");
|
CorePointerProc, CoreKeyboardProc, TRUE);
|
||||||
if (!EnableDevice(inputInfo.pointer, TRUE) ||
|
if (result != Success) {
|
||||||
!EnableDevice(inputInfo.keyboard, TRUE))
|
FatalError("Failed to allocate virtual core devices: %d", result);
|
||||||
FatalError("Failed to enable core devices.");
|
}
|
||||||
|
|
||||||
|
result = ActivateDevice(inputInfo.pointer, TRUE);
|
||||||
|
if (result != Success) {
|
||||||
|
FatalError("Failed to activate virtual core pointer: %d", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
result = ActivateDevice(inputInfo.keyboard, TRUE);
|
||||||
|
if (result != Success) {
|
||||||
|
FatalError("Failed to activate virtual core keyboard: %d", result);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!EnableDevice(inputInfo.pointer, TRUE)) {
|
||||||
|
FatalError("Failed to enable virtual core pointer.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!EnableDevice(inputInfo.keyboard, TRUE)) {
|
||||||
|
FatalError("Failed to enable virtual core keyboard.");
|
||||||
|
}
|
||||||
|
|
||||||
InitXTestDevices();
|
InitXTestDevices();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue