It handles exit() properly, calling the handler also when the plugin returns
normally (also make exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.
To work better together with callbacks passed to rb->default_event_handler_ex() introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases rb->default_event_handler_ex() was passed a callback which was manually called at all other return points. This can now be done via atexit().
In future plugin_crt0.c could also handle clearing bss, initializing iram and more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27873 a1c6a512-1295-4272-9138-f99709370657
It handles exit() properly, calling the handler also when the plugin returns
normally (also it makes exit() more standard compliant while at it).
It also holds PLUGIN_HEADER, so that it doesn't need to be in each plugin anymore.
To work better together with callbacks passed to rb->default_event_handler_ex introduce exit_on_usb() which will call the exit handler before showing the usb screen and exit() after it.
In most cases it was passed a callback which was manually called at all other return points. This can now be done via atexit().
In future plugin_crt0.c could also handle clearing bss, initializing iram and more.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27862 a1c6a512-1295-4272-9138-f99709370657
keeping the same meaning for the center margin and spacing settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19942 a1c6a512-1295-4272-9138-f99709370657
use platform clz instruction only on ARMv5+, where we know it returns 32 for a 0 input, and remove the special case for 0
use binary search only to find most significant four bits, then use lookup table to add number of leading zeroes within those bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19888 a1c6a512-1295-4272-9138-f99709370657
allow wider covers on landscape, bringing square covers closer to suggested size from pre-scaling pictureflow
tweak defaults for center margin and cover spacing a little bit
change default title display to bottom if LCD_HEIGHT <= 100
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19877 a1c6a512-1295-4272-9138-f99709370657
pictureflow modified to use feature wrappers, and built on all targets that have tagcache and are swcodec
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19837 a1c6a512-1295-4272-9138-f99709370657
on sh, use 8.24 fixed-point C math for final division in scaler
on coldfire, use 8.32 fixed-point via emac
on other architectures, use 8.32 fixed-point C math
use shift-and-add to divide when adjusting scale factors in pictureflow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19802 a1c6a512-1295-4272-9138-f99709370657
multiplies in render_slide
fix empty slide regen on cache version change
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19782 a1c6a512-1295-4272-9138-f99709370657
settings use configfile from pluginlib
cache version is stored in config file, so that changes to the cache
file format can trigger rebuild automatically
cache version is set to 0 to flag cache as needing rebuild
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19780 a1c6a512-1295-4272-9138-f99709370657
remove some old, unused #defines
split DISPLAY_SIZE into DISPLAY_WIDTH and DISPLAY_HEIGHT
scale DISPLAY_WIDTH to compensate for pixel aspect ratio
use new DISPLAY_HEIGHT where appropriate, instead of calculating based
on LCD size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19779 a1c6a512-1295-4272-9138-f99709370657
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by
__header.api
the loader uses this pointer to initialize rb before calling entry_point
entry_point is no longer passed a pointer to the plugin API
all plugins, and pluginlib functions, are modified to refer to the
global rb
pluginlib functions which only served to copy the API pointer are
removed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657