skin engine: Fix FS#12884.

The %Vf and %Vb tags change the colors for the rest of the viewport. This
requires the rest of the vp to be redrawn when they change due to a conditional.
The previous code did this redraw in all cases (conditional or not) which
led to visible blinking.

Change-Id: Ie59dfc6fe8ed76485a2a2bd7caf1315f1944c227
playlist_viewer: Resurrect playlist viewer settings submenu in the playlist viewer context menu.

This was lost in 97a4c1ef (svn r30177) for unkown reason but the manual still
mentions this item, so I assume it was an accident. It doesn't hurt anyway.

Fixes FS#12930.

Change-Id: I2f5cd81913ec7bb911d1117e50c010a5c1b89b52
playlist_viewer: Reset icon callback after leaving the playlist viewer settings.

This fixes that the playlist viewer still shows the icons after changing
the playlist viewer specific show_icons value until re-opened.

Change-Id: I42f287bcf02b27f0255dc157560c2e6575307eb6
Print `last logf lines on panic().

If logf is enabled, panic() will print the last lines. On small
screens this is more or less useless, but on large screens it
can be very useful for debugging.

Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3
Reviewed-on: http://gerrit.rockbox.org/709
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Tested: Frank Gevaerts <frank@gevaerts.be>
bmp loader: Fix loading of monochrome/greyscale BMPs with newer headers.

The code expected the color table at offset 54 (14+size of BITMAPINFOHEADER),
which was after the BITMAPINFOHEADER header. However, newer BITMAPINFOHEADER
versions exist which have more fields before the color table. Fix this by
explicitely seeking to the color table.

Change-Id: If1dfc77e7485e5a9e0bc0e7f577152da9358bd71
icons: When loading mono icons keep them in mono format.

This enables monochrome icons them to work with the invert line selector.

Change-Id: Ic3e9219e93b4879166a10180e6067446a84a62bf
cuesheet: Search for /path/to/music.mp3.cue as well if all fails.

Change-Id: If58ea7c7b94de54f6d9b014f069807bb88c6a147
cuesheet: Fix possible buffer overflow with long filenames.

Change-Id: I49fe6da35057895d3c5a08a8723afe41eef7afe8
cuesheet: Fix another possible buffer overflow with long filenames.

Change-Id: I9d8fa8fcb0a872f688664c53881fde93f2de9436
scroll engine: Factor out renderer function so it can be called by lcd code.

This is used by lcd_puts_scroll_worker() to render the line immediately
instead of waiting for the next scroll tick when only the text was updated.
Previously lcd_puts_scroll_worker() did not render anything in this case
which could lead to visible blinking.

This fixes blinking scrolling lines with dynamic text in the skin engine.

Change-Id: I475bde8c8eb7c92f505e3c5ecf4d32bb90690536
Don't use core_alloc_maximum() in usb_storage.

usb_storage needs a fairly reasonable amount of memory. Allocating
what we need and no more allows other (future) USB drivers to get
something too, and is much cleaner in general.

Change-Id: Iec9573c0f251f02400f92d92727cbf2969785de0
put_line/scrolling: Make the scroll engine inform custom scrollers about start/stop of scrolling.

With the new lcd_putsxy_scroll_func() code can register custom scroll functions
(put_line() makes use of that). In order for the custom scroller to be able
to properly manage its userdata pointer (set via struct scrollinfo::userdata)
the scroll engine must inform the scroller about start and stop of scrolling.

To inform about start the lcd_scroll_* functions now return true when
the line will scroll. To inform about stop the scroll engine calls into the
scroller one last time, with the text set to NULL.

put_line() can use this to release the userdata registered per scrolling line
so that it can be recycled.

This fixes that some scrolling lines became glitchy after some time because
the userdata was recycled too early.

Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
Fix remote warnings and charcell reds, and remove minor left-over tuff.

Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
touchscreen/skin_engine: The touchregion handler didn't handle that vertical bars are bottom-up by default

Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
put_line(): Do not lock up if the scroll engine runs out of lines.

Allocate MAX_LINES+1 because at the time get_line_desc() is called
the scroll engine did not yet determine that it ran out of lines
(because puts_scroll_func() wasn't called yet. Therefore we can
run out of lines before setting the used field. By allocating
one item more we can survive that point and set used to false
if the scroll engine runs out of lines.

Change-Id: I7a9af1bce256c6e07d254f096bd5865fa7cf2cee
skin_engine: New param "noborder" for the bar tags.

By specifying this param the bar will not have a border/box. Instead
the inner part that fills up is maximized on the bar area.

Note that this only affects bars using foreground and background colors,
not those constructed with images.

Change-Id: Ib8dd49ecbaf9e16b96de840f5f365871b73d4fa4
put_line(): Fix buffer overflow.

At the end of the format string it wrote a last byte (or inline string) past
the end of the lcd boundaries, potentially overwriting unrelated memory. It
now makes sure it won't exceed the viewport's width.

Change-Id: Id4cfce918e8b070b7fc3c7d33f389f7a171963ff
put_line(): Add another check against possible buffer overflow (see 193911a).

Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
scroll_engine: Fix FS#12894: Text scrolling stops working after a few seconds/minutes

Since commit 706b920 a timeout of TIMEOUT_BLOCK (-1) will cause
queue_event_w_tmo() block indefinitely (previously it behaved as
TIMEOUT_NOBLOCK).  scroll_process_message() can be called with negative
timeouts, with luck also -1.

To fix this convert all negative timeouts to TIMEOUT_NOBLOCK explicitely.

Change-Id: I1fc20d93acbba50d713c8364f635365930b38cbf
fuze+: Fix pitchscreen keymap.

Like on other targets, left/right should change by 2% only temporarily.
In timestretch mode fast speed change was not available.

Fixes FS#12900.

Change-Id: I8819c2ae7266bc09565b5ef13055985acf483f98