diff options
author | Florent Villard <warly@mandriva.com> | 2004-01-21 17:06:09 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2004-01-21 17:06:09 +0000 |
commit | 5da95a07009cc2b4a5ae8fc9189129874a6f8aba (patch) | |
tree | 243fc85bce4861bc0f6b00e48ea30d3bf7f1ef3e /fbmngplay | |
parent | e275edd67fd2be83ad5236865ffa13ffdeeefff5 (diff) | |
download | bootsplash-5da95a07009cc2b4a5ae8fc9189129874a6f8aba.tar bootsplash-5da95a07009cc2b4a5ae8fc9189129874a6f8aba.tar.gz bootsplash-5da95a07009cc2b4a5ae8fc9189129874a6f8aba.tar.bz2 bootsplash-5da95a07009cc2b4a5ae8fc9189129874a6f8aba.tar.xz bootsplash-5da95a07009cc2b4a5ae8fc9189129874a6f8aba.zip |
update code from bootsplash.org
fix build with new 2.6 kernel header
add blino patches to have a more correct THEME env var handling
Diffstat (limited to 'fbmngplay')
-rw-r--r-- | fbmngplay/Makefile | 2 | ||||
-rw-r--r-- | fbmngplay/fbmngplay.c | 36 | ||||
-rw-r--r-- | fbmngplay/fbmngplay.h | 22 |
3 files changed, 30 insertions, 30 deletions
diff --git a/fbmngplay/Makefile b/fbmngplay/Makefile index ccde3dd..8656c1d 100644 --- a/fbmngplay/Makefile +++ b/fbmngplay/Makefile @@ -28,7 +28,7 @@ OBJECTS = fbmngplay.o messages.o mng.o console.o LDFLAGS = -L$(LIBDIR) LIBSS = $(LIBDIR)/libmng.a $(LIBDIR)/libz.a $(LIBDIR)/libjpeg.a -lm -LIBSD = -lmng -lz -lm +LIBSD = -lfreetype -lmng -lz -lm CFLAGS = -O2 -Wall COMPILE = $(CC) $(CFLAGS) diff --git a/fbmngplay/fbmngplay.c b/fbmngplay/fbmngplay.c index d0dbac2..7e70356 100644 --- a/fbmngplay/fbmngplay.c +++ b/fbmngplay/fbmngplay.c @@ -28,7 +28,7 @@ int verbose = 0; int buffered = 0; int waitsignal = 0; int delta = 16; -int sconly=0; +int sconly = 0; /* * Signal handlers @@ -61,14 +61,14 @@ void sigusr1_handler(int sig) int main(int argc, char *argv[]) { - int fbdev,c,option_index; + int fbdev, c, option_index; unsigned int alpha; struct fb_var_screeninfo var; struct fb_fix_screeninfo fix; /* Check which console we're running on */ init_consoles(); - + /* allocate our stream data structure */ mng = (mngstuff *) calloc(1, sizeof(*mng)); if (mng == NULL) { @@ -91,8 +91,8 @@ int main(int argc, char *argv[]) {"signal", 0, 0, 's'}, {"delta", 0, 0, 'd'}, {"version", 0, 0, 'V'}, - {"start-console",0,0,'S'}, - {"console",1,0,'c'}, + {"start-console", 0, 0, 'S'}, + {"console", 1, 0, 'c'}, {0, 0, 0, 0} }; @@ -135,9 +135,9 @@ int main(int argc, char *argv[]) version(); exit(0); case 'c': - start_console=atoi(optarg)-1; + start_console = atoi(optarg) - 1; case 'S': - sconly=1; + sconly = 1; break; default: break; @@ -160,16 +160,16 @@ int main(int argc, char *argv[]) } ioctl(fbdev, FBIOGET_VSCREENINFO, &var); - mng->fbwidth = var.xres; + mng->fbwidth = var.xres; mng->fbheight = var.yres; - mng->fbbpp = var.bits_per_pixel; + mng->fbbpp = var.bits_per_pixel; - mng->fbredo = var.red.offset; + mng->fbredo = var.red.offset; mng->fbgreeno = var.green.offset; - mng->fbblueo = var.blue.offset; - mng->fbredl = var.red.length; - mng->fbgreenl = var.green.length; - mng->fbbluel = var.blue.length; + mng->fbblueo = var.blue.offset; + mng->fbredl = var.red.length; + mng->fbgreenl = var.green.length; + mng->fbbluel = var.blue.length; /* Display might have a line length unequal * the visible line. @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) mng->fbrow = fix.line_length; mng->display = - mmap(NULL, mng->fbrow * mng->fbheight , + mmap(NULL, mng->fbrow * mng->fbheight, PROT_WRITE | PROT_READ, MAP_SHARED, fbdev, 0); #if 0 if (output) @@ -192,7 +192,8 @@ int main(int argc, char *argv[]) mng->filename = argv[optind++]; /* set up the mng decoder for our stream */ - mng->mng = mng_initialize(mng, mngalloc, mngfree, MNG_NULL); + mng->mng = + mng_initialize(mng, mngalloc, mngfree, MNG_NULL); if (mng->mng == MNG_NULL) { fprintf(stderr, "could not initialize libmng.\n"); exit(1); @@ -236,8 +237,7 @@ int main(int argc, char *argv[]) } } - memset(mng->copybuffer, 0, - 4 * mng->width * mng->height); + memset(mng->copybuffer, 0, 4 * mng->width * mng->height); run = 1; mng->alpha = alpha; if (optind == argc) { /* last file */ diff --git a/fbmngplay/fbmngplay.h b/fbmngplay/fbmngplay.h index 34d3259..08fa48e 100644 --- a/fbmngplay/fbmngplay.h +++ b/fbmngplay/fbmngplay.h @@ -20,18 +20,18 @@ /* structure for keeping track of our mng stream inside the callbacks */ typedef struct { - FILE *file; /* pointer to the file we're decoding */ - char *filename; /* pointer to the file's path/name */ - mng_uint32 delay; /* ticks to wait before resuming decode */ - unsigned char *display; /* pointer to display */ - unsigned char *copybuffer; - unsigned char *background; - mng_handle mng; /* mng handle */ - int width, height; - int fbwidth, fbheight, fbbpp, fbrow; - int fbx, fby; + FILE *file; /* pointer to the file we're decoding */ + char *filename; /* pointer to the file's path/name */ + mng_uint32 delay; /* ticks to wait before resuming decode */ + unsigned char *display; /* pointer to display */ + unsigned char *copybuffer; + unsigned char *background; + mng_handle mng; /* mng handle */ + int width, height; + int fbwidth, fbheight, fbbpp, fbrow; + int fbx, fby; int fbredo, fbredl, fbgreeno, fbgreenl, fbblueo, fbbluel; - int alpha; + int alpha; } mngstuff; extern volatile int run; |