Skip to content

Commit 85b733a

Browse files
committed
show the deactivation (oops)
1 parent d8444eb commit 85b733a

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

FlashpointSecurePlayer/FlashpointSecurePlayer.cs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,7 @@ await DeactivateModificationsAsync(delegate (string text) {
803803
}
804804

805805
private async void FlashpointSecurePlayer_Shown(object sender, EventArgs e) {
806+
//Show();
806807
ProgressManager.ShowOutput();
807808

808809
try {
@@ -864,14 +865,19 @@ private async void FlashpointSecurePlayer_FormClosing(object sender, FormClosing
864865

865866
// do stuff, but not if restarting
866867
// not too important for this to work, we can reset it on restart
867-
if (!e.Cancel) {
868-
try {
869-
await StopSecurePlayback(e).ConfigureAwait(false);
870-
} catch (InvalidModificationException) {
871-
// Fail silently.
872-
} catch (InvalidCurationException) {
873-
// Fail silently.
874-
}
868+
if (e.Cancel) {
869+
return;
870+
}
871+
872+
Show();
873+
ProgressManager.ShowOutput();
874+
875+
try {
876+
await StopSecurePlayback(e).ConfigureAwait(false);
877+
} catch (InvalidModificationException) {
878+
// Fail silently.
879+
} catch (InvalidCurationException) {
880+
// Fail silently.
875881
}
876882
}
877883
}

FlashpointSecurePlayer/ProgressManager.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,15 @@ private static void Show() {
148148
}
149149

150150
public static void Start(int size = 1) {
151-
if (size > 0) {
152-
Goals.Push(new Goal(size));
151+
if (size <= 0) {
152+
return;
153153
}
154+
155+
if (!Goals.Any()) {
156+
ProgressManager.Reset();
157+
}
158+
159+
Goals.Push(new Goal(size));
154160
}
155161

156162
public static void Stop() {

0 commit comments

Comments
 (0)