summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorColin Harrison <colin.harrison@virgin.net>2014-03-14 15:40:43 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-03-22 17:16:54 +0000
commit7fb5d765ba1e28eb775b847cef3d6079eba3bac1 (patch)
tree1fd00c147b1dce357e3911a45096c7fea950207a /hw
parent061e5eba00a9a0dc27ff76946dc5f77004fc6a56 (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwin/InitInput.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c
index 36346b7e1..38203c906 100644
--- a/hw/xwin/InitInput.c
+++ b/hw/xwin/InitInput.c
@@ -108,10 +108,11 @@ InitInput(int argc, char *argv[])
}
#endif
- g_pwinPointer = AddInputDevice(serverClient, winMouseProc, TRUE);
- g_pwinKeyboard = AddInputDevice(serverClient, winKeybdProc, TRUE);
- g_pwinPointer->name = strdup("Windows mouse");
- g_pwinKeyboard->name = strdup("Windows keyboard");
+ if (AllocDevicePair(serverClient, "Windows",
+ &g_pwinPointer, &g_pwinKeyboard,
+ winMouseProc, winKeybdProc,
+ FALSE) != Success)
+ FatalError("InitInput - Failed to allocate slave devices.\n");
mieqInit();