hw/xwin: Use AllocDevicePair()
Use AllocDevicePair() rather than allocating Windows keyboard and pointer devices individually. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
061e5eba00
commit
7fb5d765ba
|
@ -108,10 +108,11 @@ InitInput(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_pwinPointer = AddInputDevice(serverClient, winMouseProc, TRUE);
|
if (AllocDevicePair(serverClient, "Windows",
|
||||||
g_pwinKeyboard = AddInputDevice(serverClient, winKeybdProc, TRUE);
|
&g_pwinPointer, &g_pwinKeyboard,
|
||||||
g_pwinPointer->name = strdup("Windows mouse");
|
winMouseProc, winKeybdProc,
|
||||||
g_pwinKeyboard->name = strdup("Windows keyboard");
|
FALSE) != Success)
|
||||||
|
FatalError("InitInput - Failed to allocate slave devices.\n");
|
||||||
|
|
||||||
mieqInit();
|
mieqInit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user