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

Warning to PLUGIN authors

From: BlueChip <cs_bluechip_at_webtribe.net>
Date: Sun, 06 Jun 2004 02:37:59 +0100

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
Received on 2004-06-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy