Commit graph

13001 commits

Author SHA1 Message Date
Thomas Martitz
abdc5935be Introduce plugin_crt0.c that every plugin links.
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
2010-08-23 16:56:49 +00:00
Bertrik Sikken
8106c9dc64 Update of Czech language - FS #11560 by Marek Salaba
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27861 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 16:54:46 +00:00
Jens Arnold
5bea40f1de Fix HWCODEC playback broken in r27773. mpeg.c declared playlist functions on its own instead of including playlist.h due to its history, and now they got out of sync...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27860 a1c6a512-1295-4272-9138-f99709370657
2010-08-22 20:58:32 +00:00
Nils Wallménius
d660e9655c Move ffmpeg functions to their own file to avoid mixing code under different liceses in the same file. Licensing is fun!
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27859 a1c6a512-1295-4272-9138-f99709370657
2010-08-22 20:14:25 +00:00
Nils Wallménius
8b5f3cabcc forgot comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27858 a1c6a512-1295-4272-9138-f99709370657
2010-08-22 19:54:17 +00:00
Nils Wallménius
ca47ed6cba libtremor: use render_line from ffmpeg (libavcodec/vorbis.c), speedup ~1% on both arm and coldfire, output unchanged.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27857 a1c6a512-1295-4272-9138-f99709370657
2010-08-22 19:50:26 +00:00
Nils Wallménius
f30add4dc0 Safeguard against possible stack corruption when the string in the tempbuffer is as long as the buffer and strcat adds a char.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27854 a1c6a512-1295-4272-9138-f99709370657
2010-08-21 16:14:18 +00:00
Nils Wallménius
6cc0a93c3c Remove unneeded include.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27853 a1c6a512-1295-4272-9138-f99709370657
2010-08-21 16:07:34 +00:00
Nils Wallménius
851573cd5d Remove two unused defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27852 a1c6a512-1295-4272-9138-f99709370657
2010-08-21 15:49:42 +00:00
Jonathan Gordon
74ec011bb8 New skin tag: %if(<tag>, <operator>, <operand> [,option count]) which lets you do very simple logical comparissons on other tags.
<tag> is the tag to check against
<operator> is the comparisson to do, any one of... =, !=, >, >=, <, <=    (when comparring against a string tag like %ia only = and != work, and it is done NOT case sensitive)
<operand> is either another tag, a number, or text.
[option count] is an optinal number to use for the few tags which scale to the amount of options when used as a conditional (i.e %?pv<a|b|c|d> would have 4 options)

example: %?if(%pv, >=, 0)<Warning.. volume clipping|coool...>
That says "If the value from %pv (volume) is greater than or equal to 0 then display the warning line, otherwise the cool line."
%?if(%ia, =, %Ia)<same artist>   <= this artist and next artist are the same.

some tags might need a touch of tweaking to work better with this. experiment and have fun

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27846 a1c6a512-1295-4272-9138-f99709370657
2010-08-19 13:49:32 +00:00
Nils Wallménius
2e572e4da0 Whoops typoed the svn prop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27844 a1c6a512-1295-4272-9138-f99709370657
2010-08-18 09:25:45 +00:00
Nils Wallménius
68090f31a2 Enable shopper plugin for charcell too and fix the :$ tag in shopper.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27843 a1c6a512-1295-4272-9138-f99709370657
2010-08-18 09:23:06 +00:00
Nils Wallménius
4461b0498d FS10820 - Shopper, a shopping list plugin by Daniel Rigby.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27842 a1c6a512-1295-4272-9138-f99709370657
2010-08-18 09:10:37 +00:00
Peter D'Hoye
eca68ee4b2 Update Dutch language file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27838 a1c6a512-1295-4272-9138-f99709370657
2010-08-17 20:15:50 +00:00
Nils Wallménius
8799af3d73 Small change to sansa fuze keymap.
Move stop from long home to long play/pause in wps, browsers and fm screen.
In the fm screen that means switching between scan and preset is now on long home.
Move stop from the power switch to long play/pause in the hid multimedia mode.
Update manual keymaps.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27836 a1c6a512-1295-4272-9138-f99709370657
2010-08-17 14:30:10 +00:00
Michael Chicoine
f3774df8be Fix FS#11547 - When selecting radio skin the currently loaded skin is not hilighted when menu is entered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27835 a1c6a512-1295-4272-9138-f99709370657
2010-08-17 12:38:18 +00:00
Maurus Cuelenaere
934a5a5808 Android port: add support for hardware keys
* Forward Java KeyEvents to C layer and translate them to Rockbox BUTTON_*.
 * Add a basic Android keymap

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27832 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 20:12:06 +00:00
Jonathan Gordon
43c85a4424 "Fix" FS#11349... %cs got confused because for some reason when the root menu was introduced the fm preset loading was never fixed to go back through that menu... problem is do_menu() is getting in the way now, so be like other files and dont try to reload the screen after loading... i.e go into the fms manually
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27830 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 13:16:29 +00:00
Jonathan Gordon
2cc6b5a79d Fix FS#11524 - a sbs could crash on load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27829 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 12:53:29 +00:00
Jonathan Gordon
b5412c9440 Fix FS#11469 - make the fms update as it should
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27828 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 12:07:46 +00:00
Jonathan Gordon
0be2426528 Make %pb without any params work as expected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27827 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 12:07:39 +00:00
Jonathan Gordon
a71db516f2 fix FS#11542 - %t() not working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27826 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 10:40:50 +00:00
Jonathan Gordon
e8bbbdffd4 fix FS#11519 - clock tags wernt updating like they should
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27822 a1c6a512-1295-4272-9138-f99709370657
2010-08-15 14:35:34 +00:00
Jonathan Gordon
eda80390d5 A bunch of new features for the bar type tags (%pb, %pv, %bl, etc):
* the bar orientation (horiz/vert) is now chosen based on the width and heigt values (or can be forced).
* the fill direction can now be inverted (fill right to left, or top to bottom is considered inverted)
* It can now draw a slider type bar instead of a fill type (or indeed a slider with a fill type)

To configure the new bar, any (or all) of the following params can be used after the bmp filename (order makes no difference either):
invert - cause the bar to fill in the inverted direction
vertical - draw a vertical bar (not needed if the height > width)
horizontal - draw a horizontal bar (this is obviously the default)
nofill - dont draw the filling bar (this still draws the outline, obviously pointless without the slider param)
slider - draw an image for the slider. The next param MUST be the label of the image to draw. No option to use a subimage here, so the whole image needs to be the image you want on the slider. 

example: %pb(0,0,-,-,-,nofill, slider, slider_image, invert) - draw a boring horizontal progressbar which doesnt fill and only draws the image "slider_image" which moves right to left.

the slider type might need some tweaking. let us know how it goes


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27821 a1c6a512-1295-4272-9138-f99709370657
2010-08-15 14:13:36 +00:00
Magnus Holmgren
ac2c69ccae Allow 'long' labels with single-argument %xd too. The label need to be at least 3 chars long (2 chars are treated as a single-letter-label image with a subimage).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27820 a1c6a512-1295-4272-9138-f99709370657
2010-08-15 07:08:23 +00:00
Jonathan Gordon
a9d752b1bd *really* fix the last warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27817 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:31:04 +00:00
Jonathan Gordon
d23d7a1686 last warning and fix manual
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27816 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:27:46 +00:00
Jonathan Gordon
b9093f22dd fix warnings and errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27815 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:23:07 +00:00
Jonathan Gordon
dc3778a685 Rework the skin playlist viewer so it uses the same drawing code as everything else. This should mean that all text tags now work as expected. The 2nd code param is no longer needed so drop it (you can use conditionals and sublines and stuff in the one code param.
example: %Vp(1, %?it<%in -%it|%fn>) <- show the next tracks strating from the first next track and show info if it is avilable or the filename.
Basic cuesheet support here, and will load upcoming track tags from the database if you have load to ram enabled.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27814 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 15:17:59 +00:00
Jonathan Gordon
ff8d43ddad Change %xl/%xd to use proper labels instead of single letter labels. i.e %xl(playmode, playmode.bmp, 0, 0, 4) ... %xd(playmode, %mm). You can of course still use one letter labels if you really want. %xd(Aa) will only work with one letter labels.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27813 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 11:40:20 +00:00
Jonathan Gordon
863d239aa2 Change %xd to allow for a number to be used to specify the subimage. i.e %xd(Ac) can now we written as %xd(A, 3). subimage count start at 1 so a=1, b=2 etc.
Also adds the possibility to specify a set of params which a tag can have (i.e a tag or a integer)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27812 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 11:17:49 +00:00
Mohamed Tarek
afe92f34cc Correct the check for the requested vs returned sizes in libasf.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27807 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 09:49:09 +00:00
Michael Giacomelli
f63570ace5 Add uppercase M4A file type to the mp4 parser. Technically Apple says to use lowercase, but various programs tolerate this, so we can too. Fixes FS#11536.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27805 a1c6a512-1295-4272-9138-f99709370657
2010-08-14 01:09:46 +00:00
Thomas Martitz
e60de9e5bb Fix backdrops from sbs not being loaded correctly (caused by r27791).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27802 a1c6a512-1295-4272-9138-f99709370657
2010-08-13 15:09:20 +00:00
Mohamed Tarek
0653c1c32b Update libwmavoice's README.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27801 a1c6a512-1295-4272-9138-f99709370657
2010-08-13 13:28:40 +00:00
Mohamed Tarek
a861b49cce Fix a bug in the asf parser that led to dropping packets in WMA voice. WMA voice now outputs the correct number of samples/packets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27800 a1c6a512-1295-4272-9138-f99709370657
2010-08-13 13:06:56 +00:00
Michael Giacomelli
9ba67fb35e Missed some more debug statements in libasf.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27797 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 23:52:07 +00:00
Michael Giacomelli
3e074a6410 Remove old debug line from wma.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27796 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 23:20:42 +00:00
Thomas Martitz
71610fbf62 Backdrop dir needs to go through get_user_file_path()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27791 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 17:32:59 +00:00
Thomas Martitz
ed033c0a2a Oops, committed before finishing the removal of "#include "memory.h""
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27790 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 14:01:28 +00:00
Thomas Martitz
87409a2619 Move memset6() declaration to string-extra.h, kills a warning compiling for android since it ships a memory.h.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27789 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:55:01 +00:00
Thomas Martitz
0e2286f226 Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this and a bit further cleanup in main gets rid of a warning when compiling for android.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:38:25 +00:00
Jonathan Gordon
70ebe46d74 New feature for the %xl (image load) tag. If you give it the filename __list_icons__ it will use the list icon strip instead of loading a different bmp.
example:
%xl(I, __list_icons__, 0, 0)
%xd(I, %Li)

^ display the list icon at position 0,0 in that viewport. (you can of course %xd(Ia) if you really wanted also.)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27787 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:27:10 +00:00
Magnus Holmgren
6d7900e330 When using the tag argument in %%xd(): 1) clear the image first, so that images with transparency can be used; 2) allow things like battery level or volume, where a value is limited to the number of sub-images.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27786 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 10:01:46 +00:00
Magnus Holmgren
c6078fe2a8 Slightly change bl (battery level) when used in an enum: if the enum contained 10 items, bl would return 11 if the battery level was 100 percent (the enum would then display the last entry). Now bl returns a value within the given range. Themes may need to be updated to look as intended.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27784 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 09:25:26 +00:00
Nils Wallménius
13d0eca71d libtremor: fix possible memoryleak when playing several ogg vorbis files in sequence, hopefully fixes FS#11533
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27776 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 07:50:29 +00:00
Magnus Holmgren
113764d9c0 Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename buffer), so frequent calls from the main thread would cause the audio thread to buffer the wrong track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27773 a1c6a512-1295-4272-9138-f99709370657
2010-08-11 19:01:50 +00:00
Jonathan Gordon
2e0217774f try again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27770 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:32:08 +00:00
Jonathan Gordon
dbf44a6a4d fid red/yellow... does database really need to compile all of misc.c?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27769 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:26:53 +00:00
Jonathan Gordon
489962dc4e Fix FS#11526 - %Vf(<hex>) was acceptable on grey remotes with colour main
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27768 a1c6a512-1295-4272-9138-f99709370657
2010-08-10 14:15:03 +00:00