diff options
Diffstat (limited to 'verify/getScreensize.c')
-rw-r--r-- | verify/getScreensize.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/verify/getScreensize.c b/verify/getScreensize.c new file mode 100644 index 0000000..c383b71 --- /dev/null +++ b/verify/getScreensize.c @@ -0,0 +1,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; +} |