Commit graph

143 commits

Author SHA1 Message Date
Thomas Martitz
2ad5e244c7 Correct another small typo in a comment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21746 a1c6a512-1295-4272-9138-f99709370657
2009-07-10 16:27:24 +00:00
Alexander Levin
37c7a67b47 Fix a typo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21741 a1c6a512-1295-4272-9138-f99709370657
2009-07-10 12:22:30 +00:00
Thomas Martitz
989ed2be01 Fix a few comments in gwps.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21740 a1c6a512-1295-4272-9138-f99709370657
2009-07-10 11:53:15 +00:00
Jonathan Gordon
a06f6eedae cleanup the remote+main statusbar handling a bit, and fix the bug where the remote wps might reserve the space for the statusbar even if its disabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21709 a1c6a512-1295-4272-9138-f99709370657
2009-07-08 00:51:03 +00:00
Jonathan Gordon
f1034e00f6 FS#10406 - split the statusbar setting into one for each display, and allow the bar to be at the top or bottom of the display
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21665 a1c6a512-1295-4272-9138-f99709370657
2009-07-05 18:07:58 +00:00
Jonathan Gordon
0e445fcef6 Fix the bug where the short-long fwd/back action would ffwd/rewind the next folder (consult the manual if that makes no sense)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21619 a1c6a512-1295-4272-9138-f99709370657
2009-07-03 05:08:33 +00:00
Marianne Arnold
49c9ab8120 Restore the ACTION_REDRAW case as it was before r20661 (with a slight change as suggested by Thomas Martitz). Without it you could get trapped in the WPS on targets with software hold as disabling hold again did not work correctly. Also fix(ed) typos...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21325 a1c6a512-1295-4272-9138-f99709370657
2009-06-18 13:50:11 +00:00
Thomas Martitz
6de2f14b23 Fix FS#10231. The gwps_leave_wps() call at powering down is completely unnecessary anyway as it's meant to prepare the displaying of the next screen, which isn't needed when there's no next screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21067 a1c6a512-1295-4272-9138-f99709370657
2009-05-24 16:09:00 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Jonathan Gordon
2172c91473 get repeat/hold actions working on the touchscreen WPS. prepending an action with & means that this will only get triggered if you hold down the area. cabbie WPS updated so the fwd/rwd icons will do that when held or skip fwd/back if just pressed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20974 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 06:25:18 +00:00
Jonathan Gordon
c1267dc700 allow the user to change the shuffle and repeat modes from the touchscreen, update the mr500 default wps to show how to do it (hint, press the shuffle/rep icon)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20937 a1c6a512-1295-4272-9138-f99709370657
2009-05-15 05:36:16 +00:00
Thomas Martitz
9adc03949f Revert r20786 as it caused problems with alternating sublines (they need to be reset if gui_wps_refresh() wasn't called for some time, since the subline timeout gets confused). Also, it needs to be set to get the update, since do_full_update will be set to false after track change no matter if an update happened.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20812 a1c6a512-1295-4272-9138-f99709370657
2009-04-27 18:57:51 +00:00
Thomas Martitz
29cf2e148b Setting do_full_update isn't actually needed, since the track changed event will set it if needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20786 a1c6a512-1295-4272-9138-f99709370657
2009-04-25 19:23:40 +00:00
Jonathan Gordon
0eb5dc649f beginings of a working touchscreen interface for the WPS. 2 new tags:
%T|x|y|width|height|action| <- setup a region (relative to the current viewport) where if pressed the "action" will be done (currently play/stop/prev/next/menu/browse work, suggestions for others to add and better names welcome)
%Tl<timeout> <- used as a conditional to say if the touchscreen was touched in the last <timeout>, use this to enable/disable button viewports or something... same syntax as other timeout tags

cabbiev2 for the mr500 has been modified to demonstrate the new tags. press the pause/play button to pause playback. press the rockbox logo to get back to the menu. pretty icons needed to make this more usable :)



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20753 a1c6a512-1295-4272-9138-f99709370657
2009-04-20 01:41:56 +00:00
Thomas Martitz
ec7a0c5676 Fix caption backlight.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20708 a1c6a512-1295-4272-9138-f99709370657
2009-04-14 22:13:29 +00:00
Thomas Martitz
725733ca92 Fix remote wps updating (again, FS#10121).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20693 a1c6a512-1295-4272-9138-f99709370657
2009-04-12 00:30:28 +00:00
Thomas Martitz
7ce12e62aa FS#8523 - Disable WPS updating when the backlight is off.
Disables WPS updating when the lcd is inactive (sleep or disabled, backlight doesn't count in), which prevents a good deal of code from running uselessly.
According to tests, it can yield up to 1h more battery life in cases of heavy WPSes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20666 a1c6a512-1295-4272-9138-f99709370657
2009-04-09 08:30:05 +00:00
Thomas Martitz
3eaefa65b7 Forgot to add the call too gwps_fix_statusbars(), fixes yellow too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20662 a1c6a512-1295-4272-9138-f99709370657
2009-04-08 17:31:29 +00:00
Thomas Martitz
1d52b72952 WPS update optimizations:
*) always initialize restore with true, and make the get_action timeout 1 tick if restore is true (which only happens at initially showing the wps), which makes the wps show up way faster (nearly instantly)
*) reduce the number of full updates by removing update_track (full updates are initiated by the event now), rename partial_update to update.
Now, full updates should really happen only on (re-)entering the wps or track change now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20661 a1c6a512-1295-4272-9138-f99709370657
2009-04-08 17:11:50 +00:00
Jonathan Gordon
843c7efaf8 FS9795 - some playback cleanup.
* Use events to notify things when the track has changed instead of the nasty has_track_changed()
* Event for when the mp3entry for the next track is avilable (which allows alot more tags to be static which means less redrawing in the WPS)
* virtually guarentee that the mp3entry sturct returned by audio_current/next_track() is going to be valid for the duration of the current track. The only time it wont be now is during the time between the codec finishing the previous track and the next track actually starting (~2s), but this is not an issue as long as it is called again when the TRACK_CHANGED event happens (or just use the pointer that gives)
It is still possible to confuse the WPS with the next tracks id3 info being displayed but this should fix itself up faster than it used to (and be harder to do)



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20633 a1c6a512-1295-4272-9138-f99709370657
2009-04-06 00:39:43 +00:00
Alexander Levin
9188f0ffd7 Drop the unnecessary checks since they are made by the caller
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20632 a1c6a512-1295-4272-9138-f99709370657
2009-04-05 19:39:09 +00:00
Alexander Levin
be7f5253a1 Fix hopping backwards if skip length is > 0 and we're near the end of the track (less than skip length)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20631 a1c6a512-1295-4272-9138-f99709370657
2009-04-05 19:29:21 +00:00
Thomas Martitz
23489bea1c A few skip length and dir change fixes.
*) Fix 64bit sim for playhop.
*) Revert to pre-skip length behavor for dir skipping (always have dirskipping, no matter of skip length), only prevent dir skipping if "prevent track skipping" is enabled
*) small code unification with regards to track and dir skipping

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20618 a1c6a512-1295-4272-9138-f99709370657
2009-04-04 20:33:38 +00:00
Jens Arnold
ae61b94a3f Fix the resume problems on hwcodec which were uncovered by r20483+r20485. The timing problem was there before; checking for id3 availability as a criterion whether to exit the wps was plain wrong. Now it exits only if playback actually finished.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20568 a1c6a512-1295-4272-9138-f99709370657
2009-03-29 17:58:24 +00:00
Thomas Martitz
8d5982110b Fix hwcodec to actually check for prevent_skip
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20554 a1c6a512-1295-4272-9138-f99709370657
2009-03-27 13:57:56 +00:00
Thomas Martitz
62f3e95945 FS#10014 - Separate tracklocking out of skip length, skip length prevented to skip tracks. This is a seperate setting now. tracks can still change during normal playback (i.e. a song ends).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20553 a1c6a512-1295-4272-9138-f99709370657
2009-03-27 13:53:29 +00:00
Thomas Martitz
3ab31337d8 Fix red, and use gui_wps_display() for restoration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20485 a1c6a512-1295-4272-9138-f99709370657
2009-03-23 03:18:34 +00:00
Thomas Martitz
ced2724f7d Another wps rework:
*rename gui_wps_refresh() to gui_wps_redraw() and update() to gui_wps_update() to better describe what they do
*Clear things up and differentiate better between gui_wps_redraw()/gui_wps_display()/gui_wps_update() (it wasn't so what they're supposed to do before)
*cleanup gui_wps_display() and gui_wps_update() quite a bit
*Remove unused/unneeded code, do some pointer copying to save binsize, and code cleanup at several places

Visible changes should be small

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20483 a1c6a512-1295-4272-9138-f99709370657
2009-03-23 03:08:56 +00:00
Thomas Martitz
ad59f6ed22 Fix up statusbar drawing in the wps a bit, fixing most, if not all, (re-)draw issues.
a) remove the temporary work around in gui_wps_display
b) let the  wps-statusbars redraw if it's masked (i.e. WPS_REFRESH_ALL or WPS_REFRESH_STATUSBAR)
c) fix a bug of mine, I attached re-fixing the bars to the wrong event
d) unify the decision whether to draw bars at all
e) some other style/code minor cleanups

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20400 a1c6a512-1295-4272-9138-f99709370657
2009-03-20 16:12:09 +00:00
Thomas Martitz
ce6b116bc1 Put exiting the wps entirely into the hands of the wps (restoring backdrops and statusbars, stop scrolling). Remove the restoration code from root_menu, and add some gwps_leave_wps at every possible return/screen change. This also unifies exiting the wps code-wise.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20399 a1c6a512-1295-4272-9138-f99709370657
2009-03-19 23:04:39 +00:00
Thomas Martitz
71471062eb Move gwps_leave_wps() a bit down, so that the menu-statusbars are showing in sync with the rest of the followin screen. It was shown noticeably earlier, particularly if the fade on stop is on.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20355 a1c6a512-1295-4272-9138-f99709370657
2009-03-19 14:33:22 +00:00
Thomas Martitz
aad712d39f Some style changes, move gwps_leave_wps a bit down; add a #define for restoration after 1 second and rename the one for instant restoration
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20330 a1c6a512-1295-4272-9138-f99709370657
2009-03-17 01:56:20 +00:00
Thomas Martitz
680990912c Some internal rework of the wps:
a) Put duplicated code together. The restoration code into the existing restoration part of the main loop, the exiting code into a separate function
b) Let the STATUSBAR_CHANGED event handle fixing the statusbar

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20329 a1c6a512-1295-4272-9138-f99709370657
2009-03-17 01:39:20 +00:00
Thomas Martitz
74aba34b58 Move play_hop() to gwps.c and make it static. It's the only file that calls it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20306 a1c6a512-1295-4272-9138-f99709370657
2009-03-12 18:50:24 +00:00
Jonathan Gordon
036fb05dfd Accept a quick patch from Alexander Levin to neaten up the #defines and comments from my earlier commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19897 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 13:43:08 +00:00
Jonathan Gordon
80cb3551eb Statusbar handling fixes.
Fixes FS#9845 - %we/%wd wasnt working
WPS no longer resets the viewportmanger more than needed (was doing it twice/draw before)
screens can now enable/disable the statusbar easily ignoring the setting instead of needing special handling (fix for the radio screen coming soon)

minor glitch introduced in this commit... the statusbar in the WPS might disappear for a fraction of a second when it is entered, I need to track this down...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19894 a1c6a512-1295-4272-9138-f99709370657
2009-02-01 11:34:16 +00:00
Jonathan Gordon
b84fe020a5 use the playback PLAYBACK_EVENT_TRACK_CHANGE instead of the WPS to keep track of the current track (for follow playlist)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19747 a1c6a512-1295-4272-9138-f99709370657
2009-01-11 04:03:17 +00:00
Jonathan Gordon
12b8f8de89 fix FS#9772 - the statusbars were not working correclty on multi screen targets in the WPS
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19742 a1c6a512-1295-4272-9138-f99709370657
2009-01-10 13:16:24 +00:00
Jonathan Gordon
04dcf117a1 revert part of r19705 which caused fS#9773
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19732 a1c6a512-1295-4272-9138-f99709370657
2009-01-09 04:46:28 +00:00
Jonathan Gordon
a68e5d835f remove some useless/unused stuff from gwps.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19705 a1c6a512-1295-4272-9138-f99709370657
2009-01-07 10:57:51 +00:00
Jonathan Gordon
8b9fdb540c redo how the statusbar updates are done. send the EVENT_GUI_ACTIONUPDATE event every time get_action() is called. The event wont be as realiable (timewise) as before, but seems to work better
This also fixes FS#9761.
Also set the lcd font back to the ui font from the debug screens which use sysfont


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19681 a1c6a512-1295-4272-9138-f99709370657
2009-01-05 09:59:11 +00:00
Jonathan Gordon
b86f2d05fc woops... fix the header and bump the plugin API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19636 a1c6a512-1295-4272-9138-f99709370657
2009-01-02 01:43:00 +00:00
Jonathan Gordon
9296126417 More SYS_FOURHERTZ handling fixes.. (FS#9740 FS#9741)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19635 a1c6a512-1295-4272-9138-f99709370657
2009-01-02 01:29:13 +00:00
Jonathan Gordon
a02702ce1d try again... BUTTON_NONE is not a sys event :p
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19631 a1c6a512-1295-4272-9138-f99709370657
2009-01-01 05:12:27 +00:00
Jonathan Gordon
6728678385 fis FS#9739 - yesterdays statusbar commits broke the WPS disk spindown handling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19630 a1c6a512-1295-4272-9138-f99709370657
2009-01-01 05:04:34 +00:00
Andrew Mahone
781421afa2 resize-on-load for bitmap files on 2bpp and color targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19374 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 23:07:59 +00:00
Jonathan Gordon
c41bd04722 revert the previous commit to find a nice way to fix the yellow...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19111 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 09:56:38 +00:00
Jonathan Gordon
76d2dd9c0e FS#9477 - new WPS tag (%mo) which lets the WPS have different "modes" which are changed with the usual "back to browser" button (This button is ONLY stolen if the WPS you use uses this tag.
an example use:
%?mo<one|two|three>
meaning that when the WPS is first opened "one" will be displayed, pressing select will change it to showing two, pressing it again will show three, and once more will go back to showing one. The text there could be any wps tags (conditional viewports for example...)
There is no real limit on the amount of modes, but remember that if you create a WPS which uses this tag more than once that every use HAS to have the same amount of choices or bad things will happen.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19110 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 09:38:15 +00:00
Frank Gevaerts
2f8a0081c6 Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 16:14:28 +00:00
Jonathan Gordon
71898e5c54 Accept FS#9480 - centralise and organise the events in the apps/ layer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
2008-10-16 10:38:03 +00:00