Commit graph

15205 commits

Author SHA1 Message Date
Thomas Martitz
428f069a1f talk: Remove superflous call to talk_init().
talk_init() is called by settings_apply() already which is called on boot.
Doing it again means loading the voicefile a second time which isn't necessary.

Change-Id: I4decd16401e63bf87338d3163c99d06d69fe3a3c
2014-02-02 19:40:38 +01:00
Dominik Riebeling
f63b42ad41 Correct the number of codepages on charcell.
63cfbe0 fixed the number of codepages for bitmap targets. The same issue is
present on charcell, so update the number for that as well, fixing UTF-8
missing in the list.

Change-Id: Ib5d3494ed3d80e839ae3f59ec0a4277e5aa9d6fd
2014-01-27 20:27:15 +01:00
Thomas Martitz
efc20ec164 talk: When no voice file is loaded don't even attempt to load the clip, it's hopeless.
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
2014-01-27 10:05:48 +01:00
Thomas Martitz
543027564c hwcodec/talk.c: Give the thumbnail buffer regardless of the talk buffer policy.
When the policy is not set, it'll by default not give the clip buffer away.
Callers of core_alloc_maximum() suffer from this. However, the thumbnail
buffer can be easily freed when needed because nothing needs to be
reloaded from disk when it is reallocated (thumbnail clips are loaded on
demand, when in the file browser). Do this to give core_alloc_maximum() callers
a better chance to succeed with the default talk buffer policy.

Change-Id: I8c0da29c520612ca903f6c930bd7c74ae97eca3b
2014-01-26 19:14:47 +01:00
Purling Nayuki
946c348e5c Fix incorrect language string reference in eq_menu.c
In most of the translations strings with SYSFONT in title is
translated. This leads to displaying problem in (at least) graphical
equalizer due to the lack of non-latin character support in the
built-in font.

Change-Id: I0d27a5358e4eb539d4247c84975d8501d7668836
Reviewed-on: http://gerrit.rockbox.org/727
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-01-26 16:26:00 +01:00
Thomas Martitz
8142c68bd2 Fix red on monochrome.
Change-Id: Ice40c81d0d07f7ec2014697e4de446dcb956afe8
2014-01-22 17:31:24 +01:00
Thomas Martitz
6cb11764e0 skin_engine/backdrops: Have to reload default backdrops from setting when it changed.
When skins use the default backdrop (via %X(-) or no %X at all) and the setting
changes it needs to be reloaded, otherwise when changing themes the new theme
could show the backdrop from the previous theme. The same needs to be
done when re-selecting the same theme after USB because the backdrop file was
potentially overwritten.

Fixes FS#12892 and FS#12942.

Change-Id: Ic2d20740cc385fa99667ce8a71507dbda2efceaf
2014-01-22 16:58:58 +01:00
Thomas Martitz
6879af9784 rockbox: Improve button repeat handling.
Change-Id: I1259c43019c51828b2af73f312aee9cf399d57cf
2014-01-18 23:06:55 +01:00
Frank Gevaerts
63cfbe096b There are 15 codepages to choose from, not 14.
2d9c0bab added a codepage but didn't increase the number of choices
for the setting, so UTF8 dropped off the list.

Change-Id: I154032bddaabcb783212370a12b2e5cdea305302
2014-01-18 20:39:13 +01:00
Thomas Martitz
c448d7e79c rockboy: Fix button read method.
The old method simply polled the lastbtn variable in button.c. This approach
does not clear the button event queue which overflows as a result (panic
in the simulator). Use proper APIs to fix that and adopt the
method from the old read_scroll_wheel() function, which reads buttons until
the button queue is empty, for all targets.

Change-Id: Ibf198f6e597e7f51ab4ebcfcae4ebebbe8d7845c
2014-01-18 19:47:55 +01:00
Thomas Martitz
33f5fdeadf rockblox: Fix compilation under recent mingw-w64-gcc.
Change-Id: I703d967e9288e5c74556b54ad4f72ef2f6247083
2014-01-17 11:14:00 +01:00
Purling Nayuki
335d708c99 Fix chinese-trad translation
Change-Id: Ifccb5c17d165d18e5076fb7ebc1af3cda3e2f778
Reviewed-on: http://gerrit.rockbox.org/726
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2014-01-16 11:26:03 +01:00
Marcin Bukat
7ab237b025 buflib: Add crc field protecting buflib cookie integrity
This should catch the case of buffer misuse which results
in corrupted cookie of next allocation. The check is performed
on move_block() so it may be a bit late.

There is buflib_check_valid() provided which checks the
integrity of all cookies for given context.
On DEBUG build with --sdl-thread this check is carried out
for core_ctx on every context switch to catch problems earlier.

Change-Id: I999d4576084592394e3dbd3bdf0f32935ff5f601
Reviewed-on: http://gerrit.rockbox.org/711
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2014-01-16 10:17:39 +01:00
Marcin Bukat
7f5dce4116 ipods: fix DEBUG builds
iap-core.h defines LOGF_ENABLE unconditionally but hexstring()
helper function was not compiled if logf support was not
selected in configure. The regular builds worked by accident
because logf() lines where discarded by preprocessor.

Change-Id: Id76af478e7c760d81168ebf9bf3eb973a679987c
2014-01-16 08:19:27 +01:00
Thomas Martitz
47f648fd92 Fix Player warning.
Change-Id: I43989c92935710b36b68891a637db2e2cafb0401
2014-01-16 00:44:06 +01:00
Thomas Martitz
aa4c2a53f3 usb screen: Crop logo to the UI viewport dimensions.
If the UI viewport is too small only the most top/left parts of the logo will
be displayed. This goes one step further than bac85f2.

Change-Id: I832b0e787e57e3b102a9c097cf1cccd7d4ad92d9
2014-01-16 00:28:18 +01:00
Thomas Martitz
a6483344f6 usb screen: Push the usb screen onto the activity stack. This enables %cs tag support for it.
Change-Id: Icecb72007aa3aba501c702e1aa65c801fcbc3857
2014-01-16 00:26:45 +01:00
Thomas Martitz
98591a2815 menus: Stop scrolling before entering the USB screen or remnants of the previous list could appear on it.
Change-Id: I2753c239ef787e0a6af64c3d9c5bdeb26326a9d0
2014-01-16 00:25:40 +01:00
Thomas Martitz
a969e1f456 usb: Do not disable themes in the USB screen.
Fonts can now be assumed (by the code) to be available during USB. Make
use of this fact in the USB screen and don't disable the skins.

Change-Id: I525359aae16660604e8fe89addc0bdf97a3fafc1
2014-01-15 23:37:39 +01:00
Thomas Martitz
84c7d6133b tagtree: Use strnatcasecmp() for the database browser too.
Even though you can insert leading zeros that makes ascii sort work for
numbers, sometimes the leading zeros don't suffice. In order to always
sort numerically strnatcasecmp() is needed.

With the default tagnavi.config this affects albums with discnum > 9
or tracnums > 99. This FS#12888.

Change-Id: Ie265c86eaf6dd07b6beda9e5eef25eb81eef8fd4
2014-01-15 23:18:35 +01:00
Thomas Martitz
4f5b13077e Fix Player
Change-Id: Ie489f91f78a9bdbded9b4ce09c74602dbca3934b
2014-01-15 22:56:39 +01:00
Thomas Martitz
5007bd64c3 Fix checkwps.
Change-Id: Ic10df965d55939b4d5ff5105f83a08a097877910
2014-01-15 22:40:18 +01:00
Thomas Martitz
2eb873cea6 skins: Update SBS when changing activities.
When changing activities (those that are indicated via %cs skin tag), the sbs
needs to be updated, so that the UI viewport can be applied before that
activity draws its UI.

Fixes FS#12804. I hope this commit doesn't have bad side effects.

Change-Id: If45654e356749f5f27991430dbd1da6f23e6f802
2014-01-15 18:57:46 +01:00
Thomas Martitz
644d9eab6c radio: Fix crash with radioart after skipping some stations
Change-Id: I5dbf60598f9b0b7d56272b6736726c1e6bc2295c
2014-01-15 14:48:55 +01:00
Thomas Martitz
d0d9f868f6 FMS: Load/update the skin at last, when fully initialzed, so that it can display the right content from the beginning.
Change-Id: I15a708d34912c0749f2497baabf90d26deaaf5df
2014-01-14 22:45:04 +01:00
Szymon Dziok
bac85f2cb4 Always check, if the USB logo for remotes overrides their physical size.
This fixes displaying of the main USB screen on m:robe 100. A remote for
this particular target has no native remote USB logo and it uses a larger
one. However it's a good idea to perform this check always IMHO.

Change-Id: I56ceb2316c551269be011b60271d8da11cb8b073
2014-01-13 21:46:57 +01:00
Frank Gevaerts
72367f458e Don't try to set default_val in volume_limit_is_changed().
We don't use the default_val anywhere, so there's no need to try
to use it in a buggy and null pointer dereferencing way here.

Change-Id: Ie60dbab7647056e2bf457cb5dcc5b60012ea1651
2014-01-13 15:26:13 +01:00
PurlingNayuki
f0bec023d9 Implement volume limiter feature
Add a "volume limit" parameter to the configuration file. The maximum
value of volume setting in sound menu will be limited to the same as
volume limit. Also each time when setvol() is excuted, Rockbox will
check if the global_settings.volume value larger than
global_settings.volume_limit. If larger, take the value of volume_limit
instead. The volume_limit argument shares the same maximum and minimum values
with volume argument, while taking the maximum volume as its default value.

Change-Id: I8ca9bc6ea6e617b48fc346aae5f2a0a1d259ae36
Reviewed-on: http://gerrit.rockbox.org/697
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2014-01-13 11:32:03 +01:00
Thomas Martitz
4e1c690ea7 skin_engine: Stricter checking for x, y, width, height for bar tags.
Every theme that doesn't parse anymore now has broken values. I hope it's not
too many of them.

Change-Id: I6f52e55dc9197d0919f854240723a88f99c0b7da
2014-01-12 23:13:45 +01:00
Thomas Martitz
d243e7e7fe 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
2014-01-12 21:42:00 +01:00
Thomas Martitz
09e655f89d put_line(): Add another check against possible buffer overflow (see 193911a).
Change-Id: Idc6637cc42afe612375dab3acac8495278f68f0a
2014-01-12 19:19:05 +01:00
Thomas Martitz
193911af76 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
2014-01-12 17:37:16 +01:00
Thomas Martitz
3ae73433ab 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
2014-01-12 15:22:29 +01:00
Thomas Martitz
6e882b43b6 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
2014-01-12 12:12:13 +01:00
Thomas Martitz
c0a02c98c1 touchscreen/skin_engine: The touchregion handler didn't handle that vertical bars are bottom-up by default
Change-Id: I4e7fc451c7ba318acb110c587bff4306c393e09f
2014-01-12 11:02:02 +01:00
Thomas Martitz
0a0d61e777 Fix remote warnings and charcell reds, and remove minor left-over tuff.
Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
2014-01-12 01:50:21 +01:00
Thomas Martitz
488a1b983e 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
2014-01-12 01:34:06 +01:00
Thomas Martitz
2a471c9e84 cuesheet: Fix another possible buffer overflow with long filenames.
Change-Id: I9d8fa8fcb0a872f688664c53881fde93f2de9436
2014-01-11 18:24:48 +01:00
Thomas Martitz
fe08ac4c2f cuesheet: Fix possible buffer overflow with long filenames.
Change-Id: I49fe6da35057895d3c5a08a8723afe41eef7afe8
2014-01-11 18:01:22 +01:00
Konstantin Kudakov
8c286b4686 cuesheet: Search for /path/to/music.mp3.cue as well if all fails.
Change-Id: If58ea7c7b94de54f6d9b014f069807bb88c6a147
2014-01-11 16:29:00 +01:00
Thomas Martitz
5d37d2579a 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
2014-01-11 14:19:43 +01:00
Thomas Martitz
ce8aef737c 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
2014-01-11 14:19:43 +01:00
Thomas Martitz
fe73d75e74 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
2014-01-11 10:49:45 +01:00
Thomas Martitz
2d4bf62032 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
2014-01-11 10:46:37 +01:00
Thomas Martitz
d4d3f3c494 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
2014-01-10 21:54:06 +01:00
Thomas Martitz
99f3f77ee8 skin_engine: Pass string to put_line() via $t because they can be very large.
Change-Id: I02d6bf492bb42e173a7b436427e3cc3560d80183
2014-01-09 23:28:33 +01:00
Thomas Martitz
7ba2d0160b put_line(): Limit and truncate inline strings to MAX_PATH+32.
Because inline strings have to be copied (to escape '$') the local buffer
can be exhaused. The code didn't check for this. The buffer is increased
to handle filenames plus some extra chars but truncates to avoid overflow.

If you have longer strings please pass them via $t tag, in which case
put_line() imposes no additional length-limitation.

Change-Id: I0ca20adbe72f6d44cb442f34d665c16b12cbbaeb
2014-01-09 23:17:38 +01:00
Thomas Martitz
3be3a40138 put_line: Be more careful with changing fg and bg colors.
put_line() needs to change fore- and background colors if required by
the line style. This should really only be done if required, and be undone
as to not compromise subsequent lines. This fixes %Vf and %Vb skin tags.

Change-Id: I85e5a0d1d64aa9eb76a891d9ce1de1320274a69a
2014-01-09 17:42:47 +01:00
Thomas Martitz
124e9c1cb6 Fix put_line via multiscreen API on remotes. Stupid me.
Change-Id: Id75dfd6ab3957dd27cb7db6f8776f754d85c19b4
2014-01-08 10:45:00 +01:00
Thomas Martitz
81be2016bb Fix Player red and icons on mono displays.
Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
2014-01-07 23:39:37 +01:00