From: GetAway Date: Sun, 1 Oct 2017 14:21:11 +0000 (+0200) Subject: init Framebuffer before 1st scale2res X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=90519b6af2d97ff82fd46ad48400053b62938510;p=msgbox.git init Framebuffer before 1st scale2res --- diff --git a/msgbox.c b/msgbox.c index 0d0f9c0..f4eef71 100644 --- a/msgbox.c +++ b/msgbox.c @@ -17,7 +17,7 @@ typeof (b) __b = (b); \ __a > __b ? __a : __b; }) -#define M_VERSION 2.06 +#define M_VERSION 2.10 #define NCF_FILE "/var/tuxbox/config/neutrino.conf" #define HDF_FILE "/tmp/.msgbox_hidden" @@ -506,6 +506,31 @@ FILE *fh; ShowUsage(); return 0; } + + //init framebuffer before 1st scale2res + fb = open(FB_DEVICE, O_RDWR); + if(fb == -1) + { + perror(__plugin__ " "); + exit(1); + } + if(ioctl(fb, FBIOGET_FSCREENINFO, &fix_screeninfo) == -1) + { + perror(__plugin__ " \n"); + return -1; + } + if(ioctl(fb, FBIOGET_VSCREENINFO, &var_screeninfo) == -1) + { + perror(__plugin__ " \n"); + return -1; + } + + if(!(lfb = (uint32_t*)mmap(0, fix_screeninfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0))) + { + perror(__plugin__ " \n"); + return -1; + } + dloop=0; for(tv=1; !dloop && tv"); - exit(1); - } - InitRC(); if((trstr=malloc(BUFSIZE))==NULL) @@ -847,25 +865,6 @@ FILE *fh; printf(NOMEM); return -1; } - - //init framebuffer - - if(ioctl(fb, FBIOGET_FSCREENINFO, &fix_screeninfo) == -1) - { - perror(__plugin__ " \n"); - return -1; - } - if(ioctl(fb, FBIOGET_VSCREENINFO, &var_screeninfo) == -1) - { - perror(__plugin__ " \n"); - return -1; - } - - if(!(lfb = (uint32_t*)mmap(0, fix_screeninfo.smem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fb, 0))) - { - perror(__plugin__ " \n"); - return -1; - } //init fontlibrary