refresh neither leaks wraps, allows 2 of the same at once, nor closes raws

This commit is contained in:
bel
2023-03-25 10:50:39 -06:00
parent 97cc3ae151
commit ae1e32391c
18 changed files with 94 additions and 64 deletions

View File

@@ -3,6 +3,7 @@ package wrap
import (
"context"
"mayhem-party/src/device/input/button"
"mayhem-party/src/device/input/raw"
"os"
"sync"
"time"
@@ -57,6 +58,11 @@ func (b *Buffered) listen() {
}
}
func (b *Buffered) CloseWrap() raw.Raw {
b.can()
return b.input.CloseWrap()
}
func (b *Buffered) Close() {
b.input.Close()
b.can()