From: notaz Date: Sun, 30 Oct 2011 19:15:24 +0000 (+0000) Subject: input: don't configure unprobed devices X-Git-Tag: v1.85~121 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23bfd0f2cca795dc6629bfdbf6854d30d08daadb;p=picodrive.git input: don't configure unprobed devices git-svn-id: file:///home/notaz/opt/svn/PicoDrive@936 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/common/input.c b/platform/common/input.c index bdeebbe6..c6243c94 100644 --- a/platform/common/input.c +++ b/platform/common/input.c @@ -541,7 +541,10 @@ int in_set_config(int dev_id, int what, const void *val, int size) return 0; } - return DRV(dev->drv_id).set_config(dev->drv_data, what, *ival); + if (dev->probed) + return DRV(dev->drv_id).set_config(dev->drv_data, what, *ival); + + return -1; } const char *in_get_dev_name(int dev_id, int must_be_active, int skip_pfix) diff --git a/platform/common/input.h b/platform/common/input.h index 65e088f8..e82ecaae 100644 --- a/platform/common/input.h +++ b/platform/common/input.h @@ -19,6 +19,9 @@ #define PBTN_MENU (1 << 10) +// TODO: move to pico +#if 0 + /* ui events */ #define PEVB_VOL_DOWN 30 #define PEVB_VOL_UP 29 @@ -48,6 +51,7 @@ #define PEV_MASK 0x7ff80000 +#endif enum { IN_CFG_BIND_COUNT = 0,