Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Warning to PLUGIN authors
From: BlueChip (cs_bluechip_at_webtribe.net)
Date: 2004-06-06


Hi tech-heads,

I've just found a gorgeous bug.

I found it during tests on the new audio plugin, but it could explain the
random crashes in Othelo as well. Of course, if any other plugin author
has nicked or implemented the same code it will effect you too.

The problem is, in simple terms, that rb->button_get(false)
does not issue a yield(), but rb->button_get(true) does.

This MAY be an oversight in the core code; If it was deliberate I openly
contest the decision. But anyway, the solution is simple:
Issue your own yield().

I use code which does (by example) animation while waiting for a key:
for (key=0; !key; key=rb->button_get(false))
        animate();
This must be changed for:
for (key=0; !key; key=rb->button_get(false), rb->yield())
        animate();

Happy hacking,

BlueChip

_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa