Rockbox Development > Starting Development and Compiling
Changing background color
linuxstb:
Your first attempt looks correct to me, but as others have said, looping through all 14 million colours will take a while...
Can you post the entire source to your plugin? Maybe something else is causing it to fail.
jonashn:
It's just the helloworld plugin with the background-changer code added:
--- Code: ---#include "plugin.h"
PLUGIN_HEADER
static struct plugin_api* rb;
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
{
(void)parameter;
rb = api;
rb->lcd_set_backdrop(NULL);
rb->lcd_clear_display();
unsigned int a,b,c=0;
for(a=0;asleep(HZ/10);
}
}
}
return PLUGIN_OK;
}
--- End code ---
linuxstb:
You need a call to rb->lcd_update() in there (e.g. just before the rb->sleep() call).
jonashn:
Thanks linuxstb! That works.
stripwax:
--- Quote from: jonashn on February 22, 2007, 10:52:40 AM ---Thanks linuxstb! That works.
--- End quote ---
Wait .. what? The original code did have the lcd_update .. so how come the original post complained it didn't work? ???
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version