Skip to content

Commit

Permalink
Refactor and prevent pause stalling
Browse files Browse the repository at this point in the history
  • Loading branch information
maurhofer-ubique committed Jan 24, 2024
1 parent 45a4ffb commit 13e2c71
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ class GLThread constructor(
}

while (!finished) {
if ((!isDirty.get() && glRunList.isEmpty()) && (isPaused || System.currentTimeMillis() - lastDirtyTimestamp.get() > BREAK_MIN_FINISH_MS)) {
val isAfterBreakMinThreshold = System.currentTimeMillis() - lastDirtyTimestamp.get() > BREAK_MIN_FINISH_MS
if ((!isDirty.get() && glRunList.isEmpty() && isAfterBreakMinThreshold) || isPaused) {
var wasPaused = false
do {
var firstPause = false
Expand Down

0 comments on commit 13e2c71

Please sign in to comment.