From eca0f6a60f933d05fefad30677c63082d3c66604 Mon Sep 17 00:00:00 2001 From: XoxJlopeZi4BB Date: Sun, 26 Jan 2025 07:24:52 +0400 Subject: [PATCH] fuuuu --- fb/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fb/main.go b/fb/main.go index 3248dff..316d7a1 100644 --- a/fb/main.go +++ b/fb/main.go @@ -24,6 +24,7 @@ func Resolution() (w int, h int) { } var devfb *os.File +var width, height = Resolution() func init() { var err error @@ -40,8 +41,8 @@ func Bytes(c color.Color) []byte { func Draw(img image.Image) error { buf := bufio.NewWriterSize(devfb, 1<<16) - for h := 0; h < Height; h++ { - for w := 0; w < Width; w++ { + for h := 0; h < height; h++ { + for w := 0; w < width; w++ { _, err := buf.Write(Bytes(img.At(w, h))) if err != nil { return err