frame pacing fix
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user