📄 videoshift.c
字号:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#define LCD 0#define VGA 1#define VIDEOSHIFT 0X6666int main(int argc, char *argv[]){ int fd; int shift =LCD; if(argc>1) { if(strcmp(argv[1],"0")==0) shift = LCD; else if(strcmp(argv[1],"1")==0) shift = VGA; else printf("false parameter\n"); } if((fd = open("/dev/fb0",O_RDWR))<0) printf("Cannot open fb device!\n"); ioctl(fd,VIDEOSHIFT,shift); close(fd); return 0; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -