summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Close <Benjamin.Close@clearchain.com>2009-02-19 14:39:29 +1030
committerBenjamin Close <Benjamin.Close@clearchain.com>2009-04-02 13:02:32 +1030
commit4134bd0f23acf3ff30311007ceba9ecbe568a70a (patch)
tree16ec9c937f188c60e6866e2b934b5f0816d2cda2
parent49ef8a40f96c0383a8a42a78fda3a990ac934e59 (diff)
Error out when selecting a device by name but more than one instance of the name exists
Previously the check was in place for the duplicate name, however the first device with the requested name was still selected regardless. Correct this by exiting out forcing the user to select by id instead Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
-rw-r--r--src/xinput.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/xinput.c b/src/xinput.c
index 466a814..b319326 100644
--- a/src/xinput.c
+++ b/src/xinput.c
@@ -191,6 +191,7 @@ find_device_info(Display *display,
"Warning: There are multiple devices named \"%s\".\n"
"To ensure the correct one is selected, please use "
"the device ID instead.\n\n", name);
+ return NULL;
} else {
found = &devices[loop];
}