Skip to content

Commit

Permalink
various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zefie committed Jul 21, 2019
1 parent c141a0f commit 684285c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions BXPlayerGUI/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ private void ProcessStartupOptions(string serialized_data)
bw.DoWork += new DoWorkEventHandler(
delegate (object o, DoWorkEventArgs arg)
{
while (bx.Duration == 0 && bx.PlayState == PlayState.Playing)
while ((bx.Duration == 0 && bx.PlayState == PlayState.Playing) || bx.PlayState != PlayState.Playing)
{
// fucking terrible I know
Thread.Sleep(100);
Expand Down Expand Up @@ -1409,7 +1409,7 @@ private void LyricLog_Click(object sender, EventArgs e)
if (lyric2.Length > 0) LyricDialogTextbox.AppendText(lyric2);
LyricChecker = new System.Windows.Forms.Timer
{
Interval = 100,
Interval = 50,
};
LyricChecker.Tick += LyricChecker_Tick;
LyricDialog.Controls.Add(LyricDialogTextbox);
Expand Down Expand Up @@ -1445,7 +1445,7 @@ private void LyricChecker_Tick(object sender, EventArgs e)
{
if (_lyric_raw_dialog_last_time == new DateTime(0))
{
_lyric_raw_dialog_last_time = DateTime.Now.AddMilliseconds(-100);
_lyric_raw_dialog_last_time = DateTime.Now.AddMilliseconds(((System.Windows.Forms.Timer)sender).Interval * -1);
}
if (_lyric_raw_dialog_last_time < _lyric_raw_time)
{
Expand Down Expand Up @@ -1477,9 +1477,10 @@ private void LyricChecker_Tick(object sender, EventArgs e)
int endlen = lyriclen;
if (_lyric_raw.StartsWith("/") || _lyric_raw.StartsWith("\\"))
{
startlen++;
endlen--;
startlen--;
}

if (_lyric_raw.EndsWith(" "))
endlen--;

Expand Down

0 comments on commit 684285c

Please sign in to comment.