diff options
author | cnlohr <lohr85@gmail.com> | 2018-06-23 14:18:26 -0400 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2018-06-23 14:18:26 -0400 |
commit | 1dea63123ca6735cee354f3eeae69e2e62d61e3b (patch) | |
tree | a93f86d0f33ad91b4c34f975b55ae54415e8f6c1 /src/survive_driver_dummy.c | |
parent | 87b6229f6fc4e434b9472e6c7722e40497ac97a1 (diff) | |
parent | 5329e026dfb52f904965b687a717cc4c24f2cd8c (diff) | |
download | libsurvive-1dea63123ca6735cee354f3eeae69e2e62d61e3b.tar.gz libsurvive-1dea63123ca6735cee354f3eeae69e2e62d61e3b.tar.bz2 |
Merge branch '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; |