diff options
| author | Michael <[email protected]> | 2017-05-06 12:36:45 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-06 12:36:45 -0400 |
| commit | 2d8831c29ca4d05d66ad4b90db66250094e734c9 (patch) | |
| tree | 44a578bbcfb9e9e2f4dfbdd293fc1a355b640824 | |
| parent | e131f72a9b863cc75a4db71670c41efa319886fb (diff) | |
| download | shiftos_thereturn-2d8831c29ca4d05d66ad4b90db66250094e734c9.tar.gz shiftos_thereturn-2d8831c29ca4d05d66ad4b90db66250094e734c9.tar.bz2 shiftos_thereturn-2d8831c29ca4d05d66ad4b90db66250094e734c9.zip | |
fix highscore glitch
| -rw-r--r-- | ShiftOS.WinForms/Applications/Pong.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index ae70aff..433e05f 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -981,6 +981,10 @@ namespace ShiftOS.WinForms.Applications var hs = unite.GetPongHighscores(); foreach (var score in hs.Highscores) { + if(this.ParentForm.Visible == false) + { + Thread.CurrentThread.Abort(); + } string username = unite.GetDisplayNameId(score.UserId); this.Invoke(new Action(() => { @@ -994,8 +998,15 @@ namespace ShiftOS.WinForms.Applications } catch { - Infobox.Show("Service unavailable.", "The Pong Highscore service is unavailable at this time."); - this.Invoke(new Action(pnlgamestats.BringToFront)); + try + { + if (this.ParentForm.Visible == true) + { + Infobox.Show("Service unavailable.", "The Pong Highscore service is unavailable at this time."); + this.Invoke(new Action(pnlgamestats.BringToFront)); + } + } + catch { } //JUST. ABORT. THE. FUCKING. THREAD. return; } }); |
