aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-10-06 17:27:24 +1000
committerinmarket <andrewh@inmarket.com.au>2015-10-06 17:27:24 +1000
commit5c615c3430cf1457d721f22a90808edc067fb6ea (patch)
treefd8cc8b2c219f55046f988bacffd488fb2c1ab37 /demos
parent52783f7cc44a06251649c179f1fa00916436f925 (diff)
downloaduGFX-5c615c3430cf1457d721f22a90808edc067fb6ea.tar.gz
uGFX-5c615c3430cf1457d721f22a90808edc067fb6ea.tar.bz2
uGFX-5c615c3430cf1457d721f22a90808edc067fb6ea.zip
Stop overwriting by the bounce ball when switching away from it in the applications/combo demo
Diffstat (limited to 'demos')
-rw-r--r--demos/applications/combo/bounce.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/applications/combo/bounce.c b/demos/applications/combo/bounce.c
index 72e75af8..f0b78266 100644
--- a/demos/applications/combo/bounce.c
+++ b/demos/applications/combo/bounce.c
@@ -91,8 +91,6 @@ static DECLARE_THREAD_FUNCTION(task, param) {
minx = miny = 0; maxx = width; maxy = height; // The clipping window for this frame.
while(run) {
- gfxYield();
-
// Draw one frame
gdispStreamStart(winx+minx, winy+miny, maxx-minx, maxy-miny);
for (y=miny; h = (bally-y)*ii, y<maxy; y++) {
@@ -144,6 +142,9 @@ static DECLARE_THREAD_FUNCTION(task, param) {
ballx += dx; bally += dy;
dx = ballx < radius || ballx > width-radius ? spinspeed=-spinspeed,-dx : dx;
dy = bally > height-1.75*floor ? -.04*height : dy+.002*height;
+
+ // Give someone else a go on cooperative os's like RAW32
+ gfxYield();
}
return 0;
}