I'm trying to use this for a couple of add-on programs but although my version of the plugin is working there are two issues: The "PitDisplay" control (matching "Control - Pit Display" in Controller.JSON) is not in the list, there is only "DisplayMode" ( "Control - Display Mode") which cycles through the LCD modes. I can work around that by operating "DisplayMode" until the pit display is showing but it's messy and I'm guessing this is easy to fix. The "Headlights" control doesn't operate the headlights, I presume because it's considered an "actual vehicle input"? Code: // ** Sorry, no control allowed over actual vehicle inputs ... would be too easy to cheat! ** I have worked around this with my Headlights program but it would be nice to do it "properly" and this is not a true "vehicle input" and certainly doesn't allow cheating.
And that's why you have a Headlights program, and I have a half written headlight flashing plugin I abandoned when I found the control couldn't be used from a plugin
Supplementary question: given the comment Code: // Note: since the game calls this function every frame for every available control, you might consider // doing a binary search if you are checking more than 7 or 8 strings, just to keep the speed up. why is CheckHWcontrol called with strings that are never going to be acted upon if they do match, a complete waste of processor time?
Answering my own question 1, ToggleMFDB does "Control - Pit Display" In addition, the menu items can be operated whether it's toggled on or off and the changes show up in AccessPitMenu() Next: why is CheckHWcontrol called with these strings especially! 'MusicPause' 'MusicPlay' 'MusicPlayNext' 'MusicPlayPrevious' 'MusicVolumeDown' 'MusicVolumeUp'