This commit is contained in:
2026-07-09 14:15:38 +03:00
commit 8127789b08
8 changed files with 368 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import fcntl
import struct
FBIOGET_VSCREENINFO = 0x4600
with open('/dev/fb0', 'r+b') as fb:
fb_var_screeninfo = '12sL9I'
var_info = fcntl.ioctl(fb, FBIOGET_VSCREENINFO, struct.pack(fb_var_screeninfo, b'', 0, *[0]*9))
xres, yres, xres_virtual, yres_virtual, xoffset, yoffset, bits_per_pixel = struct.unpack('7I', var_info[:28])
print(xres)
print(yres)
print(bits_per_pixel)