frame pacing fix

This commit is contained in:
Dmitry Sergeev
2026-09-02 00:39:30 +03:00
parent da5ff8ea4a
commit b8cb750fb4
5 changed files with 118 additions and 1 deletions
+3 -1
View File
@@ -532,6 +532,7 @@ func main() {
if err := r.RecreateSwapchain(); err != nil {
if errors.Is(err, renderer.ErrMinimized) {
resized = true
paceFrame(frameStart)
continue
}
panic(err)
@@ -543,7 +544,7 @@ func main() {
var shownSource playback.FeedConfig
hasFrame := false
frameCtx, frameCancel := context.WithTimeout(ctx, 100*time.Millisecond)
frameCtx, frameCancel := context.WithTimeout(ctx, videoPollInterval)
pendingFrame, frameErr := videoBridge.Next(frameCtx)
frameCancel()
@@ -1094,6 +1095,7 @@ func main() {
if rerr := r.RecreateSwapchain(); rerr != nil {
if errors.Is(rerr, renderer.ErrMinimized) {
resized = true
paceFrame(frameStart)
continue
}
panic(rerr)