static void subcon(char *text, ButtConfig *bc) { uint8 buf[256]; int wc; for(wc=0;wc<MAXBUTTCONFIG;wc++) { sprintf(buf,"%s (%d)",text,wc+1); DWaitButton(buf,bc,wc); if(wc && bc->ButtType[wc]==bc->ButtType[wc-1] && bc->DeviceNum[wc]==bc->DeviceNum[wc-1] && bc->ButtonNum[wc]==bc->ButtonNum[wc-1]) break; } bc->NumC=wc; }
// Sub-configure? Reconfigure controllers according to text from the CLI (command line interface)? static void subcon(char *text, ButtConfig *bc) { uint8 buf[256]; int wc; // which controller for(wc=0; wc<MAXBUTTCONFIG; wc++) { sprintf(buf,"%s (%d)",text,wc+1); DWaitButton(buf, bc, wc); if(wc && bc->ButtType[wc]==bc->ButtType[wc-1] && bc->DeviceNum[wc]==bc->DeviceNum[wc-1] && bc->ButtonNum[wc]==bc->ButtonNum[wc-1] ){ break; } } bc->NumC = wc; // translation: "number controller" = "which controller" }