Should fix crash problem regarding lightbar color tooltip

At least it works for me. Related to issue #823
This commit is contained in:
Travis Nickles 2019-09-24 15:15:58 -05:00
parent 9e557daefd
commit 78470696f8

View File

@ -1949,7 +1949,7 @@ namespace DS4Windows.Forms
} }
if (!saving && !loading && tb != null) if (!saving && !loading && tb != null)
tp.Show(tb.Value.ToString(), tb, (int)(dpix * 100), 0, 2000); tp.Show(tb.Value.ToString(), tb, (int)(dpix * 100), 0, 1000);
} }
int bgc = 245; //Color of the form background, If greyscale color int bgc = 245; //Color of the form background, If greyscale color
@ -2121,6 +2121,7 @@ namespace DS4Windows.Forms
inputtimer.Stop(); inputtimer.Stop();
sixaxisTimer.Stop(); sixaxisTimer.Stop();
root.OptionsClosed(); root.OptionsClosed();
tp.Dispose();
Visible = false; Visible = false;
e.Cancel = false; e.Cancel = false;
} }
@ -2515,7 +2516,7 @@ namespace DS4Windows.Forms
private void LightBar_MouseDown(object sender, MouseEventArgs e) private void LightBar_MouseDown(object sender, MouseEventArgs e)
{ {
if (!saving && !loading) if (!saving && !loading)
tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 2000); tp.Show(((TrackBar)sender).Value.ToString(), ((TrackBar)sender), (int)(100 * dpix), 0, 1000);
} }
private void Lightbar_MouseUp(object sender, MouseEventArgs e) private void Lightbar_MouseUp(object sender, MouseEventArgs e)