Skip to content

Commit f012b66

Browse files
committed
use progress manager state over progress form state
1 parent 76adef5 commit f012b66

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

FlashpointSecurePlayer/ProgressManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,13 @@ private static ProgressBarStyle ProgressFormStyle {
507507
ProgressFormValue = ProgressManager.value;
508508
return;
509509
}
510+
511+
// error/paused states take priority over marquee style
512+
if (ProgressManager.state != PBST_NORMAL) {
513+
return;
514+
}
510515

511-
// only enter indeterminate state from normal/no progress states
512-
// we enter from no progress in case the value was reset
513-
// error/paused states take priority over indeterminate state
514-
if (ProgressManager.progressFormState != TBPF.TBPF_NORMAL
515-
&& ProgressManager.progressFormState != TBPF.TBPF_NOPROGRESS) {
516+
if (ProgressManager.progressFormState == TBPF.TBPF_INDETERMINATE) {
516517
return;
517518
}
518519

@@ -559,7 +560,6 @@ private static int ProgressFormValue {
559560
ProgressManager.progressFormState = TBPF.TBPF_NOPROGRESS;
560561
} else {
561562
// if we haven't completed, ignore the value in the marquee style
562-
// (note: we don't check indeterminate state here, in case we are trying to leave that state)
563563
if (ProgressManager.style == ProgressBarStyle.Marquee
564564
&& ProgressManager.state == PBST_NORMAL) {
565565
// it's really important that there's no race condition here, so

0 commit comments

Comments
 (0)