Commit graph

1623 commits

Author SHA1 Message Date
Frank Gevaerts
e6fd7d2d1f Make the recorder build with HAVE_LCD_FLIP disabled.
Change-Id: I5875dc5c59606867299cc0e30d869b817e879ade
2012-08-28 21:36:23 +02:00
Thomas Martitz
85a6715afa yesno/touchscreen: Only accept on touch release.
Keeping the touchscreen pressed during a screen transition can lead
to accidental actions. action_wait_for_release() currently doesn't work
properly for touchscreen, so it's better to not transition before release.

Change-Id: I37bd67945b05fff1b4a5452313f6415a247e3af9
2012-08-15 23:10:28 +02:00
Thomas Martitz
5d9b26f6a2 folder_select: fix problem when selecting / as folder.
Change-Id: Id4880267e8478cebe073b958a58fef1ac22dd336
2012-08-15 23:10:28 +02:00
Thomas Martitz
54e6bafada Fix missed buttons in action.c if action_wait_for_release() was called
with no button pressed.

If e.g. two yesno screens directly follow each other the button release of the
first one was incorrectly accepted in the second one. The fix exposed another
problem in action.c if action_wait_for_release() is called when no button is
actually pressed. The next press was silently eaten.

This time re-introducing FS#12723 is avoided by leaving the offending hunk
out in yesno.c.

Change-Id: Icfe57375067f51f5c8177f3585cd47ceec9dcf0d
2012-08-15 23:08:26 +02:00
Fred W. Bauer
53c6bab75b We should reload the playlist control file when leaving
USB mode to make sure the filedescriptor is correct.

Change-Id: I2905eaf27533d935a0458b630372584e353c7160
Reviewed-on: http://gerrit.rockbox.org/294
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-08-14 06:23:24 +02:00
Jonathan Gordon
70eb3e6a56 Revert "fix erroneous button read in yesno screen and missed buttons in action.c."
This reverts commit 15775c8bad.
2012-08-14 12:12:15 +10:00
Jonathan Gordon
bd6e6ed403 folder selector: handle long press to invert selection/select all.
Doing a LONG PRESS on a:
- unopened folder will select all its sub-folders
- opened folder will invert the selection of its sub-folders

Change-Id: Ia7fd8dc3b940f60adee3f0314bf6bba5eb2c7b3b
2012-08-13 15:03:12 +10:00
Jonathan Gordon
7c31ff2fb0 Fix skin engine error message
Change-Id: I2250be6d4e82cd5d91ed1a2c080e263dd7543129
2012-08-06 10:35:22 +10:00
Thomas Martitz
8c655cfdc0 New GUI browser to select one (or more) folders.
The browser lets the user pick one or more directories in a convinient
GUI browser. The initial directory list is read from a string
(separated by colons) and the resulting list is written back to the same
string (again separated by colons).

Note: The work was initially done by Jonathan Gordon, however I changed
it substantially so I claim autorship.

This selector is going to be used for autoresume and database scan folders.

Change-Id: Id1d3186dad783411eb5c6056ce93f5b6123c7aa0
2012-07-30 21:20:51 +02:00
Jonathan Gordon
9dd2eb49be skin_engine: Support percentages for viewport positioning
%V(0,50%,75%,50%,-) - make a viewport at x=0, y=half the lcd height,
75% lcd width and the remaining height (the other half) of the lcd.

Change-Id: If26ccb65e8dc52c9225f3fd6d7b222d770add0f0
Reviewed-on: http://gerrit.rockbox.org/184
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-07-29 04:24:38 +02:00
Jonathan Gordon
08238178d3 lists: Support '\t' in list item text to indent the line containing it.
Change-Id: I1583371228ed477b504c135f81cb59a0c3c931e6
Reviewed-on: http://gerrit.rockbox.org/296
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Tested-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-07-19 01:21:10 +02:00
Thomas Martitz
15775c8bad fix erroneous button read in yesno screen and missed buttons in action.c.
If two yesno screens directly follow each other the button release of the
first one was incorrectly accepted in the second one. The fix exposed another
problem in action.c if action_wait_for_release() is called when no button is
actually pressed. The next press was silently eaten.

Change-Id: Iaa5f246f7ea1fd775606620a989cdaec74a9305e
2012-07-18 10:28:08 +02:00
Jonathan Gordon
68ee7aac6e skin_engine: Make pressing the setting bar touch region work
might need some tweaking, but works.

Change-Id: I0784cd4fe9996531da6cc275491ff3b4e83cdbcf
2012-07-06 14:28:34 +10:00
Jonathan Gordon
65f9df3083 skin_engine: Allow the %St() (setting) skin tag be used as a bar
%St(<setting name>) or %St(<bar tags>, setting, <setting name>)

Change-Id: I71396d683634d4d1ad2357018c4029ecb4229677
2012-07-05 23:30:06 +10:00
Jonathan Gordon
c413591e7e fix build warnings
Change-Id: Id5f0e84834f1cb74a317bb5653fdb6f665233345
2012-07-05 11:24:08 +10:00
Jonathan Gordon
d336eb30f8 skin_engine: Automatically create touch regions for skin bars
skin bars now automatically create the touch region the same size
as the bar on touchscreen targets. This means touches will
magically "just work" for reveresed bars (rtl or otherwise).

~5% padding is added on all 4 sides of the region rectangle but
this may need to be tweaked.

Please consider the 'progressbar' and 'volume' touchregion actions
to be deprecated.

Kudos to my new wife for figuring out the bleedingly obvious way to
do this!

Change-Id: I997a7bcaa70fce9885808aae27953c7676e9c2ff
2012-07-05 11:15:16 +10:00
Frank Gevaerts
7151111228 Make touchscreen handling work with skinned lists.
Change-Id: I7df93319c8f16f05e840d74b022aab4803bb8f80
2012-06-19 22:02:59 +02:00
Frank Gevaerts
21ddcbec66 CHARCELL doesn't have sbs support, so disable it properly.
This actually fixes a nullpointer dereference.

Change-Id: Ie3e153d72bcacdce46bfe5a514ff77aebdfd7225
2012-06-19 21:53:29 +02:00
Thomas Martitz
2760d578ca touchscreen: Don't hide selection by default. Fixes FS#12675.
Change-Id: Ic7e22ce6280d4105c38f7588717f4cf34c1bb5a3
2012-06-15 13:00:20 +02:00
Bertrik Sikken
d023bf0f5d Fix checks on buflib allocated handles (0 is not a valid handle value)
Change-Id: I8fdc5a59a5062f40a431cd49971390e21631b8ec
2012-06-10 17:15:47 +02:00
Jonathan Gordon
7a009276bc Fix FS#12674 - %ax() doesnt mirror viewport correctly
Change-Id: I10c933542037eeedc9c4be74b3d43a1430ec05b2
2012-05-30 21:17:40 +10:00
Bertrik Sikken
f340768ad5 _lists_uiviewport_update_callback can be made static
Change-Id: I25dfaa1636811a0340d1730a5a8f44caa85b1771
2012-05-20 01:57:49 +02:00
Frank Gevaerts
053722a573 Don't trigger a skin refresh from skinlist_draw()
Thiskin refresh trigger apparently causes the skin and list to continuously
refresh, with the side effect that buttons no longer work.

Change-Id: I4439406176890ac46a3f217bfff43c6935a03a7c
Reviewed-on: http://gerrit.rockbox.org/240
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-05-18 09:48:31 +02:00
Jonathan Gordon
7909bf039f (hopefully) Fix FS#12639 and other skin related buflib corruption issues.
Kudos to funman for figuring out the problem - skin_find_item() rather
stupidly uses the global skin_buffer variable in skin_parser.c which is
fine in the parser EXCEPT it gets changed in skin_render when the sbs
is being redrawn while another skin is loading, so fix this by makeing
skin_find_item() use a local data pointer so a skin_render() during
parsing won't break anything.

Change-Id: I80e1c0efe569c18225e5772159c18ebb21e07332
2012-05-16 22:33:40 +10:00
Thomas Martitz
8689bcc186 Touchscreen: Check if click is outside of list. Fixes FS#12669
Change-Id: Ic036f4c399b89c65bdc43bfdf7111bf4a13be484
2012-05-13 19:15:19 +02:00
Nils Wallménius
d29a11b7a8 Rename HAVE_PITCHSCREEN to HAVE_PITCHCONTROL
Also move the definition to config.h

Change-Id: I36bb5020c5e06b2344292bc05e8c13ccc7a6a1ff
Reviewed-on: http://gerrit.rockbox.org/234
Reviewed-by: Nils Wallménius <nils@rockbox.org>
2012-05-09 14:32:38 +02:00
Rafaël Carré
65bb8e4452 Remove extraneous parens 2012-05-06 23:13:34 -04:00
Rafaël Carré
aaf9a1be49 get_image_filename() return value is never used 2012-05-06 23:00:52 -04:00
Rafaël Carré
675f171cf1 skin_parser: simplify skin_buffer_alloc
- no need to cast void * return value (it is not C++)
- use sizeof(*var) instead of sizeof(struct foobar), it is shorter and will
  stay correct if the type is changed but forgotten in the sizeof()
2012-05-06 22:43:21 -04:00
Michael Sevakis
da6cebb6b0 Use buflib for the allocation of voice PCM resources.
Buffers are not allocated and thread is not created until the first
call where voice is required.

Adds a different callback (sync_callback) to buflib so that other
sorts of synchonization are possible, such as briefly locking-out the
PCM callback for a buffer move. It's sort of a messy addition but it
is needed so voice decoding won't have to be stopped when its buffer
is moved.

Change-Id: I4d4d8c35eed5dd15fb7ee7df9323af3d036e92b3
2012-05-02 17:22:28 -04:00
Michael Sevakis
57a20d2d63 Make DSP's replaygain independent of global_settings.
Moves replaygain definitions to lib/rbcodec/dsp/dsp_misc.h.
Intermediate functions in misc.c handle any adjustment and calling
the rbcodec APIs.

Change-Id: I9f03561bca9aedd13760cf19c4e19aa3c68e7024
Reviewed-on: http://gerrit.rockbox.org/140
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-30 22:47:37 +02:00
Michael Sevakis
56f17c4164 Make rbcodec/dsp includes more specific.
Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
2012-04-29 17:31:30 -04:00
Michael Sevakis
c9bcbe202d Fundamentally rewrite much of the audio DSP.
Creates a standard buffer passing, local data passing and messaging
system for processing stages. Stages can be moved to their own source
files to reduce clutter and ease assimilation of new ones. dsp.c
becomes dsp_core.c which supports an engine and framework for effects.

Formats and change notifications are passed along with the buffer so
that they arrive at the correct time at each stage in the chain
regardless of the internal delays of a particular one.

Removes restrictions on the number of samples that can be processed at
a time and it pays attention to destination buffer size restrictions
without having to limit input count, which also allows pcmbuf to
remain fuller and safely set its own buffer limits as it sees fit.
There is no longer a need to query input/output counts given a certain
number of input samples; just give it the sizes of the source and
destination buffers.

Works in harmony with stages that are not deterministic in terms of
sample input/output ratio (like both resamplers but most notably
the timestretch). As a result it fixes quirks with timestretch hanging
up with certain settings and it now operates properly throughout its
full settings range.
Change-Id: Ib206ec78f6f6c79259c5af9009fe021d68be9734
Reviewed-on: http://gerrit.rockbox.org/200
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-04-29 10:00:56 +02:00
Thomas Martitz
4269934588 touchscreen/lists: fix two regressions
* fix potential stack overflow through recursion
* fix using using the scrollbar during active kinetic scrolling animation

Change-Id: Iaf124970a60d3f0c2ee7919ac278f2d6ac329e47
2012-04-17 17:19:31 +02:00
Thomas Martitz
d3ead233a8 touchscreen: fix some issues/crashes with clicking the list title.
Change-Id: I31adb012ac39f9b27f6b91f5077ed4195ba1dc02
2012-04-10 10:09:39 +02:00
Thomas Martitz
48c248d02b touchscreen: fix swipe scrolling (jumped back to previous item).
Change-Id: I055a5b19dec1db3ad31212dadc11b0f5056be832
2012-04-08 13:28:21 +02:00
Thomas Martitz
688302a3b3 touchscreen: Rewrite kinetic scrolling using a state machine.
The old code was very confusing. The scrolling modes need to be handled
differently, thus a state machine makes sense. Should fix numerious
glitches and be easier to maintain.

NOTE: Behavior is still a bit glitchy with an SBS in use, because the skin
engine sees the touch events earlier than the list code.

Change-Id: I4ccead359c81de0d0fc3dea636fe2cb3a28d1bc6
2012-04-08 13:16:54 +02:00
Thomas Martitz
bb0e4cc543 touchscreen: Fix kinetic scrolling when the statusbar is off.
The scrolling code cannot differentiate between the BUTTON_TOUCHSCREEN post
from normal touches and the one posted in the timeout callback.

To fix introduce a global special button (BUTTON_REDRAW) that results
in the desired redraw. This existed already as a local kludge for android
and is now generalized.

Change-Id: I6bfa6c66431c48f5042fcd8fce2ea72cd3457f58
2012-04-05 15:01:59 +02:00
Jonathan Gordon
6f62226294 quickscreen: optionally display the shortcuts menu instead of the QS
Adds an option under settings > general settings > system to allow
the user to have the shortcuts menu displayed instead of the
quick screen. (option is "shortcuts instead of quickscreen" in the .cfg)

Change-Id: Id679b461c40ac617629422736d1509384364084d
Reviewed-on: http://gerrit.rockbox.org/199
Reviewed-by: Marek Salaba <marek.salaba@gmail.com>
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-03-28 10:56:12 +02:00
Jonathan Gordon
b2202a3d7c skin_engine: Allow negative numbers for the start offset in %ss
i.e %ss(-1, -, %ia) will get the last letter in the %ia tag

Change-Id: I6b2764d30c072b549e7424fc6e847ec48850b46a
2012-03-27 23:42:00 +11:00
Jonathan Gordon
9445d4625a skin_engine: fix scrolling lines with dynamic content
Change-Id: If85220c8b59123814e0e6b1a3b8e00c981271021
2012-03-26 22:24:43 +11:00
Thomas Martitz
6e6f0c6ef3 Redraw simplelist if/when necessary-
Change-Id: I14a1cce8967af60a52d2d13e0b035b71fece8a63
2012-03-22 21:05:30 +01:00
Jonathan Gordon
94139ac0bd Fix FS#12606 - next track can cause the screen to be cleared
This is a bit of a hack. We now trigger an event when the skin engine
is doing a full redraw (which means fullscreen clear) before the
lcd_update() to give the current screen a chance to redraw to avoid the
screen flicker.

This commit fixes the issue for screens which are entirely the list
widget (i.e browser and menus), other screens will need aditional fixes
(i.e quickscreen, time&date screen)

Change-Id: I3725c51518be724ce7aacee9877663c2de6866fa
2012-03-20 22:10:19 +11:00
Jonathan Gordon
5edae54e0d skin_engine: Reenable skin debugging in the sim (use --debugwps)
Change-Id: I2881edda45cd3ea69f5284d93bc93c47bb63b3f2
2012-03-15 23:26:07 +11:00
Jonathan Gordon
182a6c80ba Fix compile errors
Change-Id: Ic985bf57da04847bff716ee41db8f107100ff95b
2012-03-15 23:03:33 +11:00
Jonathan Gordon
014a08cabb skin_engine: New tag to draw a rectangle (optionally with a gradient)
%dr(x, y, width, height, [colour1[, colour2]]):
x,y - viewport relative pixel coordinates to start the rectangle.
width, height - obvious. can be '-' to fill the viewport
if both colours are left out the viewports foreground colour will be used
if one colour is specified it will fill the rectangle that colour.
if both colours are specified it will gradient fill the rectangle.

Change-Id: Iad451e99ded663bc7c5d182443659db7d909b388
2012-03-15 22:52:53 +11:00
Jonathan Gordon
f31e7a1225 Revert "Fix FS#12606 - next track can cause the screen to be cleared"
This reverts commit cb9bc3bbc8.
2012-03-15 11:31:18 +11:00
Jonathan Gordon
cb9bc3bbc8 Fix FS#12606 - next track can cause the screen to be cleared
This is a bit of a hack. We now trigger an event when the skin engine
is doing a full redraw (which means fullscreen clear) before the
lcd_update() to give the current screen a chance to redraw to avoid the
screen flicker.

This commit fixes the issue for screens which are entirely the list
widget (i.e browser and menus), other screens will need aditional fixes
(i.e quickscreen, time&date screen)

Change-Id: I3ffdcd8ccad2c663732f8d5983049c837de00fe5
2012-03-14 22:52:24 +11:00
Osborne Jacobs
595427c095 Add new actions to %Tp (Touchscreen areas)
Add the following actions to %Tp:
createbookmark   create a new bookmark from the wps
listbookmarks    list bookmarks from the wps
trackinfo        show track info from the wps

My main motivation was to allow bookmarking and jumping around audio books
from the wps on touch enabled targets.  You can do it now through the context
menu but it requires 4 screen presses instead of 1.

Change-Id: I1fa1bf0064dfd22b897eca7c56acc1ce8956f14c
Reviewed-on: http://gerrit.rockbox.org/171
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-03-13 03:17:12 +01:00
Frank Gevaerts
4fbbbf1360 Make %LC and %LR always have predictable and usable values.
%LC is now 1 for non-tiled list items (instead of undefined)
%LC and %LR are now -1 in non-list contexts.

Change-Id: Ib7090429fa95528bd141d3d7ca95fd917b25b96e
2012-03-01 18:40:59 +01:00