From d533a5ed7c35669a210c9b1f9a38a8edf2054f1c Mon Sep 17 00:00:00 2001 From: XoxJlopeZi4BB Date: Sun, 26 Jan 2025 07:16:49 +0400 Subject: [PATCH] fuck... --- fb/main.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fb/main.go b/fb/main.go index d0b3be8..806c4dd 100644 --- a/fb/main.go +++ b/fb/main.go @@ -8,11 +8,6 @@ import ( "os" ) -var ( - devfb *os.File - Width, Height int -) - func resolution() (w int, h int) { resFile, err := os.Open("/sys/class/graphics/fb0/virtual_size") if err != nil { @@ -28,8 +23,10 @@ func resolution() (w int, h int) { return } +var devfb *os.File +const Width, Height int = resolution() + func init() { - Width, Height = resolution() var err error devfb, err = os.OpenFile("/dev/fb", os.O_WRONLY, os.ModePerm) if err != nil {