diff options
author | cnlohr <charles@cnlohr.com> | 2018-04-26 23:25:10 -0400 |
---|---|---|
committer | cnlohr <charles@cnlohr.com> | 2018-04-26 23:25:10 -0400 |
commit | 76e1d700bf2b3eac225e3965bb562e16e3615fd5 (patch) | |
tree | aef61d7476c5c95eafe93ce81f9eacb63a2bdd27 /src/survive_driver_dummy.c | |
parent | d7aae4649d34e01d500cc87aa117e9e64f298f16 (diff) | |
download | libsurvive-76e1d700bf2b3eac225e3965bb562e16e3615fd5.tar.gz libsurvive-76e1d700bf2b3eac225e3965bb562e16e3615fd5.tar.bz2 |
Give a shot at the new config system.
Diffstat (limited to 'src/survive_driver_dummy.c')
-rw-r--r-- | src/survive_driver_dummy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/survive_driver_dummy.c b/src/survive_driver_dummy.c index e2e01a4..01d0482 100644 --- a/src/survive_driver_dummy.c +++ b/src/survive_driver_dummy.c @@ -8,6 +8,8 @@ #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 ); + struct SurviveDriverDummy { SurviveContext * ctx; SurviveObject * so; @@ -53,9 +55,7 @@ int dummy_haptic( SurviveObject * so, uint8_t reserved, uint16_t pulseHigh, uint int DriverRegDummy(SurviveContext *ctx) { - int enable_dummy_driver = survive_configi( ctx, "dummy_driver_enable", SC_GET, 0 ); - - if( !enable_dummy_driver ) return 0; + if( !GCONFIGI(DUMMY_DRIVER_ENABLE) ) return 0; SurviveDriverDummy *sp = calloc(1, sizeof(SurviveDriverDummy)); sp->ctx = ctx; |