Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Dec 28, 2023
1 parent 914e008 commit 9ee83d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/waveform/vsyncthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ void VSyncThread::run() {
int signalled = 0;
// Signal to render and swap the gl widgets (waveforms, spinnies, vumeters)
// This works best when offset with a delay wrt the vsync time.
const int offset = 8000; // Found by trial and error
const int minimumOffset = 1000000 / 60 / 2; // Without this ProMotion stutters at 60 fps
const int offset = std::max<int>(minimumOffset, pllDeltaOut / 2);
if (sincePllPhaseOut < offset) {
usleep(offset - sincePllPhaseOut);
emit vsyncRenderAndSwap();
Expand Down

0 comments on commit 9ee83d6

Please sign in to comment.