[Redbutton-devel] SF.net SVN: redbutton: [267] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-04-01 09:31:53
|
Revision: 267
http://svn.sourceforge.net/redbutton/?rev=267&view=rev
Author: skilvington
Date: 2007-04-01 02:31:49 -0700 (Sun, 01 Apr 2007)
Log Message:
-----------
clear the screen on boot/launch/retune/etc
Modified Paths:
--------------
redbutton-browser/trunk/MHEGDisplay.c
redbutton-browser/trunk/MHEGDisplay.h
redbutton-browser/trunk/MHEGEngine.c
Modified: redbutton-browser/trunk/MHEGDisplay.c
===================================================================
--- redbutton-browser/trunk/MHEGDisplay.c 2007-03-28 15:59:10 UTC (rev 266)
+++ redbutton-browser/trunk/MHEGDisplay.c 2007-04-01 09:31:49 UTC (rev 267)
@@ -384,6 +384,30 @@
return;
}
+void
+MHEGDisplay_clearScreen(MHEGDisplay *d)
+{
+ XYPosition pos = {0, 0};
+ OriginalBoxSize box = {d->xres, d->yres};
+ MHEGColour black;
+
+ box.x_length = d->xres;
+ box.y_length = d->yres;
+
+ MHEGColour_black(&black);
+ MHEGDisplay_fillRectangle(d, &pos, &box, &black);
+
+ /* use the new object we have just drawn */
+ MHEGDisplay_useOverlay(d);
+
+ /* refresh the screen */
+ MHEGDisplay_refresh(d, &pos, &box);
+
+ XFlush(d->dpy);
+
+ return;
+}
+
/*
* all these drawing routines draw onto next_overlay_pic
* all coords should be in the range 0-MHEG_XRES, 0-MHEG_YRES
Modified: redbutton-browser/trunk/MHEGDisplay.h
===================================================================
--- redbutton-browser/trunk/MHEGDisplay.h 2007-03-28 15:59:10 UTC (rev 266)
+++ redbutton-browser/trunk/MHEGDisplay.h 2007-04-01 09:31:49 UTC (rev 267)
@@ -63,6 +63,8 @@
void MHEGDisplay_refresh(MHEGDisplay *, XYPosition *, OriginalBoxSize *);
+void MHEGDisplay_clearScreen(MHEGDisplay *);
+
/* drawing routines */
void MHEGDisplay_setClipRectangle(MHEGDisplay *, XYPosition *, OriginalBoxSize *);
void MHEGDisplay_unsetClipRectangle(MHEGDisplay *);
Modified: redbutton-browser/trunk/MHEGEngine.c
===================================================================
--- redbutton-browser/trunk/MHEGEngine.c 2007-03-28 15:59:10 UTC (rev 266)
+++ redbutton-browser/trunk/MHEGEngine.c 2007-04-01 09:31:49 UTC (rev 267)
@@ -199,6 +199,8 @@
do
{
+ /* clear the display (if you want a splash screen, do it here) */
+ MHEGDisplay_clearScreen(&engine.display);
/* search for the boot object for timeout seconds */
found = false;
gettimeofday(&start, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|