Date: Thu, 12 Jun 2014 13:00:38 GMT From: seiya@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269447 - soc2014/seiya/bootsplash/sys/dev/fb Message-ID: <201406121300.s5CD0cjD071918@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); + } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406121300.s5CD0cjD071918>