fix: re-use buffer between reads

This commit is contained in:
Cameron Fleming 2025-01-04 22:26:39 +00:00
parent 74cdeca230
commit d6e4df2109
1 changed files with 1 additions and 1 deletions

View File

@ -184,8 +184,8 @@ func watchTsEvents() {
defer ts.Close()
// Watch for events
buf := make([]byte, 24)
for {
buf := make([]byte, 24)
_, err := ts.Read(buf)
if err != nil {
fmt.Printf("display: failed to read from touchscreen device: %s\n", err)