X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Finput.c;h=81f6e169af33d1aeb2d9112fe3f887e64b7f388a;hb=f15ca4db35a3466cc59b796c2a5d8b963721a02c;hp=1dae2bd67b40958fd414db4ec5b2b9d864af19dd;hpb=f3b6f1336a05b2124324d3d506997e51b69c6ee0;p=libpicofe.git diff --git a/common/input.c b/common/input.c index 1dae2bd..81f6e16 100644 --- a/common/input.c +++ b/common/input.c @@ -257,8 +257,8 @@ int in_update_keycode(int *dev_id_out, int *is_down_out, int timeout_ms) int result = -1, dev_id = 0, is_down, result_menu; int fds_hnds[IN_MAX_DEVS]; int i, ret, count = 0; + in_drv_t *drv = NULL; unsigned int ticks; - in_drv_t *drv; if (in_have_async_devs) { result = in_update_kc_async(&dev_id, &is_down, timeout_ms); @@ -426,9 +426,10 @@ const char *in_get_dev_name(int dev_id, int must_be_active, int skip_pfix) return NULL; name = in_devices[dev_id].name; - if (name == NULL) - return NULL; + if (name == NULL || !skip_pfix) + return name; + /* skip prefix */ tmp = strchr(name, ':'); if (tmp != NULL) name = tmp + 1;