Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85deb781 authored by Jason Sams's avatar Jason Sams
Browse files

Fix "return 0" behavior in rs

0 was not properly blocking for the next message.

Change-Id: I0d9f0a8f799ba457197920c6a699f80f496eaa8e
parent c1b4c1ff
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -252,10 +252,11 @@ void * Context::threadProc(void *vrsc) {
    while (!rsc->mExit) {
        uint64_t waitTime = 0;
        uint64_t now = rsc->getTime();
        if (!doWait) {
            if (now < targetTime) {
                waitTime = targetTime - now;
        } else {
            doWait = false;
                doWait = true;
            }
        }

        mDraw |= rsc->mIO.playCoreCommands(rsc, doWait, waitTime);
@@ -265,7 +266,7 @@ void * Context::threadProc(void *vrsc) {
        if (mDraw && rsc->mIsGraphicsContext) {
            uint64_t delay = rsc->runRootScript() * 1000000;
            targetTime = rsc->getTime() + delay;
            doWait = delay != 0;
            doWait = (delay == 0);

            if (rsc->props.mLogVisual) {
                rsc->displayDebugStats();