@@ -482,18 +482,19 @@ int EvDevPad::Open()
482482 case WT_GT_FORCE:
483483 case WT_DRIVING_FORCE_PRO:
484484 case WT_DRIVING_FORCE_PRO_1102:
485- if (!LoadSetting (mDevType , mPort , APINAME, N_JOYSTICK, joypath))
486485 {
487- OSDebugOut (" Cannot load device setting: %s\n " , N_JOYSTICK);
488- return 1 ;
486+ if (!LoadSetting (mDevType , mPort , APINAME, N_JOYSTICK, joypath))
487+ {
488+ OSDebugOut (" Cannot load device setting: %s\n " , N_JOYSTICK);
489+ return 1 ;
490+ }
491+ LoadSetting (mDevType , mPort , APINAME, N_HIDRAW_FF_PT, mUseRawFF );
489492 }
490493 break ;
491494 default :
492495 break ;
493496 }
494497
495- LoadSetting (mDevType , mPort , APINAME, N_HIDRAW_FF_PT, mUseRawFF );
496-
497498 if (mUseRawFF ) {
498499 if (joypath.empty () || !file_exists (joypath))
499500 goto quit;
@@ -574,8 +575,16 @@ int EvDevPad::Open()
574575 return false;
575576 }*/
576577
577- LoadMappings (mDevType , mPort , device.name ,
578- device.mappings , device.axis_inverted );
578+ switch (mType ) {
579+ case WT_BUZZ_CONTROLLER:
580+ LoadBuzzMappings (mDevType , mPort , device.name ,
581+ device.mappings );
582+ break ;
583+ default :
584+ LoadMappings (mDevType , mPort , device.name ,
585+ device.mappings , device.axis_inverted );
586+ break ;
587+ }
579588
580589 // Map hatswitches automatically
581590 // FIXME has_mappings is gonna ignore hatsw only devices
@@ -674,7 +683,7 @@ int EvDevPad::Open()
674683 }
675684 }
676685 if (!has_mappings) {
677- OSDebugOut (" Device %s [%s] has no mappings, discarding\n " , device.name .c_str (), it.second .c_str ());
686+ OSDebugOut (" Device %s [%s] has no mappings, discarding\n " , device.name .c_str (), " " ); // it.second.c_str());
678687 close (device.fd );
679688 mDevices .pop_back ();
680689 }
0 commit comments