Commit graph

1527 commits

Author SHA1 Message Date
Thomas Martitz
1645c148e3 Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 18:40:00 +00:00
Jonathan Gordon
9c8e2c8e1e skin engine: Fix %if() when comparing against a number.
If the tag being checked returns a number as a string (i.e %pv) but doesnt set the intval try to convert the string to a number so the comparisson operators work

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31003 a1c6a512-1295-4272-9138-f99709370657
2011-11-17 12:00:58 +00:00
Jonathan Gordon
b048c91eb3 OOPS! Don't overwrite the trailing \0 from the skin text with the first alloc (should fix FS#12388)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30998 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 13:43:28 +00:00
Jonathan Gordon
ea2a3ee7a8 Fix the gpl notice in the previous commits new files, and fix the yelow gevearts naughtily ignored
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30996 a1c6a512-1295-4272-9138-f99709370657
2011-11-16 10:37:48 +00:00
Jonathan Gordon
9e07ef2b0a Use buflib for all skin engine allocations.
Massive thanks to Michael Chicoine and other testers for finding the early bugs.

This removes all skin memory limitations

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
2011-11-15 14:11:08 +00:00
Thomas Martitz
86e8f6ad23 Fix another typo. sorry.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30973 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:51:25 +00:00
Thomas Martitz
0602dbce4e Fix typos in usb_screen.c and use lcd_remote_bmp() for showing the rockbox logo on remotes as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30972 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:44:27 +00:00
Thomas Martitz
9a70c42241 Add the ability to create a prefilled struct bitmap along with generated images.
This allows to directly draw generated and builtin images using lcd_bmp(bm_xxx);
Also fixes builtin list icons on non-mono targets, as they didn't have the
format field set.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30971 a1c6a512-1295-4272-9138-f99709370657
2011-11-13 15:37:16 +00:00
Thomas Jarosch
e5ea0b3418 Fix copy'n'paste bug in skin engine
cppcheckout reported:
[apps/gui/skin_engine/skin_tokens.c:1553] -> [apps/gui/skin_engine/skin_tokens.c:1553]: (style) Same expression on both sides of '||'.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30964 a1c6a512-1295-4272-9138-f99709370657
2011-11-11 16:54:21 +00:00
Fred Bauer
7c6acd4783 close file descriptor
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30962 a1c6a512-1295-4272-9138-f99709370657
2011-11-11 01:19:09 +00:00
Thomas Martitz
b02c82e105 Adapt icon and skin engine to make use of the new 32bit bitmap capabilities.
You can now use 32bit icons in lists and skins
(except album art, but can be added if wanted). The code also shows how
to free the unused alpha channel data if the bitmap doesn't actually contain
such information.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30939 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:39:28 +00:00
Thomas Martitz
13209604c1 Add new lcd_bmp and lcd_bmp_part APIs.
This new APIs wrap around lcd_[mono|transparent]_bitmap/_part calls and
handle all kinds bitmaps. The intended use is to draw bitmaps that
come from read_bmp_fd/_file.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30936 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:34:46 +00:00
Thomas Martitz
1afcd74fdd Simplify icon.c a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30934 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 21:23:02 +00:00
Jonathan Gordon
f19f3efb07 Redo r30826 (and hopefully not reintroduce font issues) which cleans up the font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 10:09:33 +00:00
Jonathan Gordon
452a3ce274 Put icons on buflib:
Removes the max icon size limitation and doesnt waste RAM

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30931 a1c6a512-1295-4272-9138-f99709370657
2011-11-08 09:36:35 +00:00
Thomas Martitz
93c6c79e8d Better fix for FS#12337. Use 0 to make the line height calculated from the font height, as before r30773.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30850 a1c6a512-1295-4272-9138-f99709370657
2011-10-29 15:16:02 +00:00
Thomas Martitz
e126153687 Fix FS#12357 - New backdrop not displayed after set backdrop from context menu
The loaded flag wasn't set and skin_backdrop_show() call was missing.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30846 a1c6a512-1295-4272-9138-f99709370657
2011-10-28 17:09:38 +00:00
Thomas Martitz
7352e72cb9 Fix charcell build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30828 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 11:12:52 +00:00
Thomas Martitz
155a9f8abd Fix FS#12337 properly. Also fixes FS#12345 which the previous commit introduced.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30827 a1c6a512-1295-4272-9138-f99709370657
2011-10-23 11:05:27 +00:00
Fred Bauer
e299eb3ea3 Add functions font_set_ui() and font_get_ui(). The font returned by FONT_UI used to be fixed at zero but since buflib-fonts (r30589) can be different, depending on the order of loads and unloads. Fixes broken behavoir in virtual keyboard (FS#12336), lyrics player (FS#12306), and hopefully, FS#12337
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30826 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 17:13:33 +00:00
Thomas Martitz
5c509d17db Fix buttonbar and line padding in time&date screen.
The time&date screen uses a custom parent for do_menu(), and doesn't
account for the buttonbar and list line height. Introduce
gui_synclist_set_viewport_defaults() to set those for viewports that are
going to be list parents and use that so that time&date screen doesn't need
to know about buttonbar/line padding.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30824 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 10:09:23 +00:00
Thomas Martitz
09d0b6fec4 Fix backwardly named variable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30823 a1c6a512-1295-4272-9138-f99709370657
2011-10-22 10:06:48 +00:00
Fred Bauer
8d74458744 Revert skin font allocation size to the behavior prior to r30589. i.e. Default to 256 glyphs rather than trying to load MAX_FONT_SIZE. This matches the manual and saves a lot of ram if a theme uses multiple fonts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30804 a1c6a512-1295-4272-9138-f99709370657
2011-10-19 16:33:33 +00:00
Thomas Martitz
ed99b6eaff Fix FS#12337. Skin viewports' line height was initialized with the UI font height.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30786 a1c6a512-1295-4272-9138-f99709370657
2011-10-18 19:04:45 +00:00
Thomas Martitz
3b12634e6b Commit FS#12321 - Touchscreen: List line padding, to more easily select lines
This adds line padding to lists on touchscreens,
in order to make lists reasonably useful without huge fonts.

It's configurable:
* Automatic (default, line height calculated using a lcd dpi aware function)
* Off (status quo, line height = font height)
* X pixels (from 2 to 50 in even steps)

The automatic setting should/aims to Just Work Out Of The Box on all targets

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30773 a1c6a512-1295-4272-9138-f99709370657
2011-10-17 17:38:10 +00:00
Thomas Martitz
4f3e1d6b48 Fix FS#12320 - need substitute to /.rockbox/skin_buffer_size.txt
Since recent skin engine related commits images aren't stored on the skin
buffer anymore. The buffer was decreased accordingly. Now some themes used that
buffer more for tokens than images and are now broken.

To fix, increase the max token count, while optimizing the two most often
allocated structs for size (so no net ram usage increase).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30762 a1c6a512-1295-4272-9138-f99709370657
2011-10-16 15:55:12 +00:00
Björn Stenberg
2176fb38b6 Missed two spots.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30757 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:47:59 +00:00
Björn Stenberg
0942e2a0f7 Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-10-15 19:35:02 +00:00
Thomas Martitz
2a04202ffa Fix touchscreen behavior in time&date screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30725 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 22:30:09 +00:00
Thomas Martitz
42a33a7f70 Correct left-over assignment.
Also remove unnecessary NULL guard.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30723 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:31:15 +00:00
Thomas Martitz
f86506675e Re-order things to fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30722 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:28:27 +00:00
Thomas Martitz
0acdc87df4 lists: Detect dirtyness (need to reinit) for each list, instead of once globally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30721 a1c6a512-1295-4272-9138-f99709370657
2011-10-07 17:22:49 +00:00
Thomas Martitz
6efb3f0760 Revert r30599 "Check for the magic file "/.rockbox/skin_buffer_size.txt" [...]"
It's not clear whether a user setting is the right/accepted fix for the skin buffer.
But even if it is, this implementation of it is considered bad, even by the author.

See http://www.rockbox.org/mail/archive/rockbox-dev-archive-2011-09/0054.shtml

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30718 a1c6a512-1295-4272-9138-f99709370657
2011-10-05 17:43:51 +00:00
Fred Bauer
b683874e98 Do not font_unload() failed fonts when aborting a skin load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30714 a1c6a512-1295-4272-9138-f99709370657
2011-10-05 04:19:00 +00:00
Bertrik Sikken
2e58d5935d Make function calc_db in peakmeter.c static
Remove some unneeded #include "peakmeter.h"

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30713 a1c6a512-1295-4272-9138-f99709370657
2011-10-04 21:25:26 +00:00
Bertrik Sikken
9bddc48b32 Remove unused function display_keylock_text
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30712 a1c6a512-1295-4272-9138-f99709370657
2011-10-04 20:34:15 +00:00
Andree Buschmann
99257101f2 Fix a 'set but not used' warning.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30615 a1c6a512-1295-4272-9138-f99709370657
2011-09-28 17:03:45 +00:00
Jonathan Gordon
4f7a73aad8 fix FS#12295
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30614 a1c6a512-1295-4272-9138-f99709370657
2011-09-28 01:02:48 +00:00
Jonathan Gordon
aca6b9e91a fix APPLICATION build errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30601 a1c6a512-1295-4272-9138-f99709370657
2011-09-25 13:01:52 +00:00
Jonathan Gordon
c89f9d9060 fix warnings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30600 a1c6a512-1295-4272-9138-f99709370657
2011-09-25 12:57:00 +00:00
Jonathan Gordon
f7c2978cc4 Check for the magic file "/.rockbox/skin_buffer_size.txt" on bootup which can have a number which is the amount of kilobytes to allocate for the skin buffer. This is only checked on boot so if you need to change it you must reboot to enable.
Currently the default size is 80KB on colour targets which can be way too much or not enough for users.
The format of the /.rockbox/skin_buffer_size.txt file is simply a number (so 120 if you want 120 kilobytes), NO trainling spaces or text of any kind

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30599 a1c6a512-1295-4272-9138-f99709370657
2011-09-25 12:55:40 +00:00
Frank Gevaerts
40f05b6ca1 Fix silly mistake
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30595 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 19:12:37 +00:00
Frank Gevaerts
5903c07ad7 Make %LT 1-based. This tag will likely only be used to print the item number (as opposed to e.g. using it as an index to a bitmap strip, which has the obvious problem of not knowing how many items there are), and most people prefer 1-based numbering systems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30594 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 19:09:33 +00:00
Jonathan Gordon
32791608fc fix checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30593 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 14:57:30 +00:00
Jonathan Gordon
83cfbf4e51 Allow fonts to use smaller buffers than the default size. use font_load_ex() to speficiy the buffer size. If the font is already loaded with a smaller buffer it will be reloaded to use the new size. Also fix an issue where handles would get lost if fonts fail to load in skins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30592 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 14:52:16 +00:00
Jonathan Gordon
aa0f4a4bbe FS#12273 - use buflib for font storage. thanks to the testers :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30589 a1c6a512-1295-4272-9138-f99709370657
2011-09-24 13:19:34 +00:00
Frank Gevaerts
28d5f2aa57 Add "%LN" tag to retrieve the list item number of the current item. This allows e.g. putting item numbers in skinned lists.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30568 a1c6a512-1295-4272-9138-f99709370657
2011-09-18 12:35:32 +00:00
Andree Buschmann
e14bda521d Fix some 'set but not used' warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30565 a1c6a512-1295-4272-9138-f99709370657
2011-09-17 20:53:28 +00:00
Jonathan Gordon
782708e494 fix warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30555 a1c6a512-1295-4272-9138-f99709370657
2011-09-15 13:55:20 +00:00
Jonathan Gordon
81343bae5d skin_engine: make sure to free all buflib allocations so we dont leak handles/memory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30554 a1c6a512-1295-4272-9138-f99709370657
2011-09-15 13:48:17 +00:00