mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-11 15:59:08 +01:00
Move event handler to only be available temporarily
This commit is contained in:
parent
c073e721fc
commit
c91b602d04
@ -115,7 +115,6 @@ namespace DS4Windows
|
||||
b.MouseLeave += button_MouseLeave;
|
||||
}
|
||||
|
||||
advColorDialog.OnUpdateColor += advColorDialog_OnUpdateColor;
|
||||
inputtimer.Tick += InputDS4;
|
||||
sixaxisTimer.Tick += ControllerReadout_Tick;
|
||||
sixaxisTimer.Interval = 1000 / 60;
|
||||
@ -1361,6 +1360,10 @@ namespace DS4Windows
|
||||
|
||||
private void btnLightbar_Click(object sender, EventArgs e)
|
||||
{
|
||||
AdvancedColorDialog.ColorUpdateHandler tempDel =
|
||||
new AdvancedColorDialog.ColorUpdateHandler(advColorDialog_OnUpdateColor);
|
||||
|
||||
advColorDialog.OnUpdateColor += tempDel;
|
||||
advColorDialog.Color = Color.FromArgb(tBRedBar.Value, tBGreenBar.Value, tBBlueBar.Value);
|
||||
advColorDialog_OnUpdateColor(main, e);
|
||||
if (advColorDialog.ShowDialog() == DialogResult.OK)
|
||||
@ -1376,6 +1379,7 @@ namespace DS4Windows
|
||||
tBBlueBar.Value = advColorDialog.Color.B;
|
||||
}
|
||||
|
||||
advColorDialog.OnUpdateColor -= tempDel;
|
||||
if (device < 4)
|
||||
DS4LightBar.forcelight[device] = false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user