コード例 #1
0
ファイル: ConfigForm.cs プロジェクト: mbhul/RoboCOM
 /********************************************************************************
 * FUNCTION:        StartControllerInput
 * Description:     Starts the polling thread used to acquire gamepad input
 * Parameters:      N/A
 ********************************************************************************/
 private void StartControllerInput()
 {
     if (!ControllerPoller.IsBusy)
     {
         ControllerPoller.RunWorkerAsync();
         System.Threading.Thread.Sleep(50);
     }
 }
コード例 #2
0
ファイル: ClientForm.cs プロジェクト: culturespy/ZapU
 void Poller(object sender, EventArgs ea)
 {
     ControllerPoller.Poller(gamepad,
                             Proxy,
                             new ControllerPoller.PanicDelegate(DoPanic),
                             new List <RadioButton>()
     {
         InputSticksRadio,
         InputTriggersRadio,
     },
                             StickSensitivityNumeric,
                             ShoulderSensitivityNumeric,
                             ShoulderMinimumNumeric,
                             clear_to_send,
                             ref A_button_debounce,
                             ref B_button_debounce,
                             ref X_button_debounce,
                             ref Y_button_debounce);
 }
コード例 #3
0
ファイル: ServerForm.cs プロジェクト: culturespy/ZapU
 private void DoInputs(object sender, EventArgs ea)
 {
     ControllerPoller.Poller(gamepad,
                             Device,
                             new ControllerPoller.PanicDelegate(DoPanic),
                             new List <RadioButton>()
     {
         RemoteInputRadio,
         InputSticksRadio,
         InputTriggersRadio,
     },
                             StickSensitivityNumeric,
                             ShoulderSensitivityNumeric,
                             ShoulderMinimumNumeric,
                             Device != null && Device.IsReady,
                             ref A_button_debounce,
                             ref B_button_debounce,
                             ref X_button_debounce,
                             ref Y_button_debounce);
 }
コード例 #4
0
ファイル: ConfigForm.cs プロジェクト: mbhul/RoboCOM
 /********************************************************************************
 * FUNCTION:        StopControllerInput
 * Description:     Terminates the gamepad polling thread
 * Parameters:      N/A
 ********************************************************************************/
 private void StopControllerInput()
 {
     ControllerPoller.CancelAsync();
 }