fuck...
This commit is contained in:
parent
930ed283a2
commit
d533a5ed7c
@ -8,11 +8,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
devfb *os.File
|
|
||||||
Width, Height int
|
|
||||||
)
|
|
||||||
|
|
||||||
func resolution() (w int, h int) {
|
func resolution() (w int, h int) {
|
||||||
resFile, err := os.Open("/sys/class/graphics/fb0/virtual_size")
|
resFile, err := os.Open("/sys/class/graphics/fb0/virtual_size")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -28,8 +23,10 @@ func resolution() (w int, h int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var devfb *os.File
|
||||||
|
const Width, Height int = resolution()
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Width, Height = resolution()
|
|
||||||
var err error
|
var err error
|
||||||
devfb, err = os.OpenFile("/dev/fb", os.O_WRONLY, os.ModePerm)
|
devfb, err = os.OpenFile("/dev/fb", os.O_WRONLY, os.ModePerm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user