aboutsummaryrefslogtreecommitdiff
path: root/verify/getScreensize.c
blob: 56393b0bae391c5d702c78b7c916e429ab553f44 (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.xres);
  return 0;
}