diff --git a/src/engine/vgmOps.cpp b/src/engine/vgmOps.cpp index 01dd2cb7c..95509affb 100644 --- a/src/engine/vgmOps.cpp +++ b/src/engine/vgmOps.cpp @@ -2418,8 +2418,10 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p } while (!done) { if (loopPos==-1) { - if (loopOrder==curOrder && loopRow==curRow && ticks==1) { - writeLoop=true; + if (loopOrder==curOrder && loopRow==curRow) { + if ((ticks-((tempoAccum+curSubSong->virtualTempoN)/curSubSong->virtualTempoD))<=0) { + writeLoop=true; + } } } songTick++; diff --git a/src/fixedQueue.h b/src/fixedQueue.h index 9866fe732..4e3379622 100644 --- a/src/fixedQueue.h +++ b/src/fixedQueue.h @@ -101,11 +101,11 @@ template bool FixedQueue::pop() { template bool FixedQueue::push(const T& item) { if (writePos==(readPos-1)) { - logW("queue overflow!"); + //logW("queue overflow!"); return false; } if (writePos==items-1 && readPos==0) { - logW("queue overflow!"); + //logW("queue overflow!"); return false; } data[writePos]=item; @@ -121,11 +121,11 @@ template bool FixedQueue::pop_front() { template bool FixedQueue::push_back(const T& item) { if (writePos==(readPos-1)) { - logW("queue overflow!"); + //logW("queue overflow!"); return false; } if (writePos==items-1 && readPos==0) { - logW("queue overflow!"); + //logW("queue overflow!"); return false; } data[writePos]=item; @@ -145,11 +145,11 @@ template bool FixedQueue::pop_back() { template bool FixedQueue::push_front(const T& item) { if (readPos==(writePos+1)) { - logW("stack overflow!"); + //logW("stack overflow!"); return false; } if (readPos==0 && writePos==items-1) { - logW("stack overflow!"); + //logW("stack overflow!"); return false; } if (readPos>0) {