Mercurial > hg > dmlib
changeset 293:bc2e8ce003d7
Improve locking.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Oct 2012 16:01:14 +0300 |
parents | 43312a36811f |
children | dd9809a93425 |
files | ppl.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ppl.c Thu Oct 11 16:00:55 2012 +0300 +++ b/ppl.c Thu Oct 11 16:01:14 2012 +0300 @@ -843,6 +843,8 @@ JSS_LOCK(engine.plr); JSSPattern *currPattern = engine.plr->pattern; int currRow = engine.plr->row; + if (!engine.plr->isPlaying) + engine.exitFlag = TRUE; JSS_UNLOCK(engine.plr); if (currRow != prevRow || force) @@ -879,14 +881,8 @@ if (force || currTick - prevTick >= (engine.pauseFlag ? 100 : 20)) { JSS_LOCK(engine.dev); - JSS_LOCK(engine.plr); dmDisplayChannels(engine.screen, 5, engine.screen->h * 0.8 + 5, engine.screen->w - 5, engine.screen->h - 5, engine.dev); - - if (!engine.plr->isPlaying) - engine.exitFlag = TRUE; - - JSS_UNLOCK(engine.plr); JSS_UNLOCK(engine.dev); }