socsvn commit: r269447 - soc2014/seiya/bootsplash/sys/dev/fb
seiya at FreeBSD.org
seiya at FreeBSD.org
Thu Jun 12 13:00:39 UTC 2014
Author: seiya
Date: Thu Jun 12 13:00:38 2014
New Revision: 269447
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269447
Log:
implement stopping animation
Modified:
soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c
Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c
==============================================================================
--- soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Thu Jun 12 12:43:48 2014 (r269446)
+++ soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Thu Jun 12 13:00:38 2014 (r269447)
@@ -45,7 +45,7 @@
static int load_bmp(video_adapter_t *adp, BMP_INFO *bmp_info, void* data);
static int draw_bmp(video_adapter_t *adp, BMP_INFO *bmp_info, int y, int height, int width);
-static video_adapter_t *adp;
+static video_adapter_t *adp = NULL;
BMP_INFO bmp_info;
int
@@ -62,6 +62,9 @@
caddr_t image = NULL;
void *p;
+ if(adp == NULL)
+ return 1;
+
// get a pointer to the first image
image = preload_search_by_type("bsplash_image");
@@ -90,10 +93,10 @@
return 0;
}
-
static void
update_animation(void *unused)
{
+ static int count = 0;
static int y = 0;
if (draw_bmp(adp, &bmp_info, y, 1024, 768) == 0){
@@ -101,9 +104,15 @@
}else{
y = 0;
draw_bmp(adp, &bmp_info, y, 1024, 768); /* try again */
- }
+ }
- timeout(update_animation, NULL, 1);
+ /* FIXME */
+ if (count > 40){
+ vidd_set_mode(adp, M_TEXT_80x25);
+ }else{
+ count++;
+ timeout(update_animation, NULL, 1);
+ }
}
More information about the svn-soc-all
mailing list