blob: c383b71b4fa0b8bf0879ea51ba302448af95afb9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <linux/fb.h>
#include <sys/ioctl.h>
#include <fcntl.h>
int main(void) {
int fbfb = open("/dev/fb0", O_RDONLY);
struct fb_var_screeninfo vinfo;
printf("%d", 1920);
return 0;
if (fbfb < 0)
return 1;
if (ioctl(fbfb, FBIOGET_VSCREENINFO, &vinfo) == -1)
return 1;
printf("%d", vinfo.yres);
return 0;
}
|