From owner-svn-soc-all@FreeBSD.ORG Thu Jun 12 13:00:39 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73CB4AB9 for ; Thu, 12 Jun 2014 13:00:39 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6075228E0 for ; Thu, 12 Jun 2014 13:00:39 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5CD0dGi072121 for ; Thu, 12 Jun 2014 13:00:39 GMT (envelope-from seiya@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s5CD0cjD071918 for svn-soc-all@FreeBSD.org; Thu, 12 Jun 2014 13:00:38 GMT (envelope-from seiya@FreeBSD.org) Date: Thu, 12 Jun 2014 13:00:38 GMT Message-Id: <201406121300.s5CD0cjD071918@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to seiya@FreeBSD.org using -f From: seiya@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269447 - soc2014/seiya/bootsplash/sys/dev/fb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2014 13:00:39 -0000 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); + } }