This commit is contained in:
Alex Eidt 2022-09-13 23:02:38 -07:00
parent 538bcb7a83
commit c9bc141f27
4 changed files with 21 additions and 8 deletions

View file

@ -209,6 +209,7 @@ func (video *Video) init() error {
return err
}
video.pipe = &pipe
if err := cmd.Start(); err != nil {
return err
}
@ -229,6 +230,7 @@ func (video *Video) Read() bool {
return false
}
}
total := 0
for total < video.width*video.height*video.depth {
n, err := (*video.pipe).Read(video.framebuffer[total:])
@ -238,6 +240,7 @@ func (video *Video) Read() bool {
}
total += n
}
return true
}