diff options
author | cnlohr <charles@cnlohr.com> | 2018-04-27 21:42:05 -0400 |
---|---|---|
committer | cnlohr <charles@cnlohr.com> | 2018-04-27 21:42:05 -0400 |
commit | 86bbd12c3889db3290e22ff61934ca1a218ce114 (patch) | |
tree | 6d7c895a86f7cd88d0b7b3e0a461ccd5c2efa8b7 /src/survive_driver_dummy.c | |
parent | 76e1d700bf2b3eac225e3965bb562e16e3615fd5 (diff) | |
download | libsurvive-86bbd12c3889db3290e22ff61934ca1a218ce114.tar.gz libsurvive-86bbd12c3889db3290e22ff61934ca1a218ce114.tar.bz2 |
New config system
Diffstat (limited to 'src/survive_driver_dummy.c')
-rw-r--r-- | src/survive_driver_dummy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/survive_driver_dummy.c b/src/survive_driver_dummy.c index 01d0482..e305b33 100644 --- a/src/survive_driver_dummy.c +++ b/src/survive_driver_dummy.c @@ -8,7 +8,7 @@ #include "survive_config.h" #include "os_generic.h" -STATIC_CONFIG_ITEM_I( DUMMY_DRIVER_ENABLE, "dummy-driver-enable", "Load a dummy driver for testing.", 0 ); +STATIC_CONFIG_ITEM( DUMMY_DRIVER_ENABLE, "dummy-driver-enable", 'i', "Load a dummy driver for testing.", 0 ); struct SurviveDriverDummy { SurviveContext * ctx; @@ -55,7 +55,8 @@ int dummy_haptic( SurviveObject * so, uint8_t reserved, uint16_t pulseHigh, uint int DriverRegDummy(SurviveContext *ctx) { - if( !GCONFIGI(DUMMY_DRIVER_ENABLE) ) return 0; + int enable = survive_configi( ctx, "dummy-driver-enable", SC_GET, 9 ); + if( !enable ) return 0; SurviveDriverDummy *sp = calloc(1, sizeof(SurviveDriverDummy)); sp->ctx = ctx; |