X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fcommon%2Finput.c;h=81f6e169af33d1aeb2d9112fe3f887e64b7f388a;hb=cc33f567ae1f9982d90a3d88c5b2ba88d1038e6e;hp=0fe8dc1337b531f9246b4b79927901ee7d92b5b7;hpb=0403eead1f44c29d6ec5398ef4827ce0ae31eec4;p=picodrive.git diff --git a/platform/common/input.c b/platform/common/input.c index 0fe8dc1..81f6e16 100644 --- a/platform/common/input.c +++ b/platform/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,6 +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 || !skip_pfix) + return name; + + /* skip prefix */ tmp = strchr(name, ':'); if (tmp != NULL) name = tmp + 1;