summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
AgeCommit message (Collapse)AuthorFilesLines
2023-12-03[BugFix] run filebrowser automatically for out of tree shortcutsWilliam Wilgus1-4/+10
missed a case for out of tree shortcuts coming from the quickscreen in the main menu Change-Id: I25714f9deaba5f0c88e50de03ead747733b7f568
2023-12-03[Feature] run filebrowser automatically for out of tree shortcutsWilliam Wilgus1-1/+3
supersedes g#5499 run .link shortcuts within menu shortcuts and just extends it to the whole plugin stack which makes sense as long as it doesn't cause any new bugs ;) Change-Id: If152f53cf6894430c1173a2af1410e7d0857825e
2023-11-25[Fix Yellow] root_menu.cWilliam Wilgus1-3/+2
Change-Id: Ib13b54e3d7818746edfd0d13c37328bd90d23b22
2023-11-25[Feature] run .link shortcuts within menu shortcutsWilliam Wilgus1-2/+7
Change-Id: Ifbc2b95ab367ae18fa51074a3f8ea551ad2ab6a8
2023-11-15Fix: Rotate indices after saving playlist w/ first_index > 0Christian Soffke1-1/+1
When saving the current playlist, entries written out to disk were rotated, but its indices were not, resulting in first_index being out of sync between the two. Thus, an incorrect index was used for any playlist commands, from the moment you saved the playlist until the next time you resumed, which didn't produce the right playlist. Change-Id: Ie4b02ce9e07e565b1b15c938cc4b820db08e8f1f
2022-12-17Remove browse_context_init()Aidan MacDonald1-2/+6
Prefer to use designated initializers to avoid having to specify unneeded parameters. Non-initialized members are zero-initialized by the compiler. Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-16open_plugin.c access open_plugin_entry through a functionWilliam Wilgus1-7/+10
just a few updates to open_plugin save a bit of space by granting access through a getter function Change-Id: I2c0eaa1ade867510798b213006064ee1c00aa016
2022-12-14wps.c cleanup gui_show_wpsWilliam Wilgus1-10/+10
remove some old cruft move a few things around clean-up flow Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-13Improve transition between plugin and WPSChristian Soffke1-3/+9
Eliminate flashing when plugins are launched from WPS, by not enabling the SBS, and by deferring other lcd updates. Also prevents flashing root menu activity when returning from plugins. Change-Id: I7d761867027f2275c4ab8e16ada3107c7ba0be6e
2022-12-11Eliminate skin updates in between activitiesChristian Soffke1-8/+41
1) Adds way to pop activity without refreshing the skin at the same time. Activities are sometimes popped in immediate succession, or one activity is popped before another one is pushed right away. This can lead to the UI appearing glitchy, due to an activity only appearing for a split-second, which is especially noticeable with complex skins that change the dimensions of the UI viewport depending on the current activity To fix this, prevent superfluous skin updates * when switching between: - WPS and browser - WPS and Playlist Catalogue - WPS and playlist - WPS and Settings/System/Plugins * when accessing Track Info or when displaying bookmarks using the context menu on the WPS * when switching from QuickScreen to Shortcuts Menu 2) The playlist viewer activity was pushed & popped redundantly by playlist_view. ---- NB: Behavior has remained unchanged in all instances of the code where pop_current_activity() has been replaced by pop_current_activity(ACTIVITY_REFRESH_NOW). Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-11-23Settings/System/Plugins: Go to WPS when ACTION_TREEE_WPS is pressedChristian Soffke1-0/+1
Used to go to root menu before. Change-Id: I5c0e0cb204cb3979917dde0f243185c32ef4177a
2022-11-19Fix return to root after selecting items from playlist viewerChristian Soffke1-4/+2
When selecting an item, Rockbox only checked that playback was stopped before entering the viewer and went to the WPS if music had started playing afterwards, but returned to the root menu otherwise The WPS will now be displayed whenever a new item has been selected, even if audio was paused or playing before. boomark_autoload required slight adjustments to its return values, so that the WPS would not be opened after a user cancels out of the bookmark selection screen for a playlist, since it previously returned true in that case, too. Change-Id: I231ea788e2f80fdda5fe4ad4d2420450931f686f
2022-11-17open_plugins add name when plugin can't open & check LANG_LAST_INDEX_IN_ARRAYWilliam Wilgus1-0/+2
can't open '' was confusing for users so pass the key to open plugin in theory you could have a plugin that defaulted to these lang_ids run but its good enough to tell the user what failed to open IMO lang_id changes mess with open_plugin since it uses them as look-up keys so add checks for LANG_LAST_INDEX_IN_ARRAY to the checksum the plugin now removes entries with an invalid checksum devices with harddrives only append their .dat file so have them skip entries with invalid checksums and only notify user if a valid entry wasn't found (these users can run the open_plugins plugin to remove invalid entries) Change-Id: Icf157675beaccda785643d5a9ed032a7cde30f12
2022-11-14replace strlcpy with strmemccpyWilliam Wilgus1-1/+1
replace applicable calls to strlcpy with calls to strmemccpy which null terminates on truncation in theory the strmemccpy calls should be slightly faster since they don't traverse the rest of the source string on truncation but I seriously doubt there is too much of that going on in the code base Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
2022-11-02Database: Fix FS#13368 – use separate selected item historyChristian Soffke1-1/+3
Database and File Browser were sharing each other’s selected item history before. Since the database isn’t browsed recursively, it’s probably unnecessary to include its own history in the tree context and its backups, saving.a little bit of memory. Change-Id: I87c9aed6f7056bc481b8b7299089851ef28f9bc5
2022-10-09add splash_progressWilliam Wilgus1-6/+10
the loading track splash flashes and is ugly add a function to display a progressbar along with the splash message spruce up database commit message as well Change-Id: I2749b958c1ee5dad2631a5f999a4b00ddca7f225
2022-03-18BUGFIX root_menu.cWilliam Wilgus1-1/+1
Change-Id: Ie6268c63f5ed5197d2da678851b4bfdf7764252c
2021-12-24Root menu: prevent infinite loop trying to exit pluginChristian Soffke1-0/+2
Rockbox could enter into an infinite loop when last_screen and next_screen were both GO_TO_PREVIOUS, which happened when trying to quit PictureFlow in the following scenario: 1) start playback from PictureFlow plugin 2) return (or be returned) to WPS directly 3) wait for playback to finish and to be returned to PF plugin Change-Id: I0b52d4df56d416f81cef027d9024e964a734fcdc
2021-11-07plugin_screen don't save settings on every plugin executionWilliam Wilgus1-1/+1
we shouldn't need to save the last_screen unless the plugin were to bypass the normal shutdown procedure if its a crash do we really want to resume the plugin? its it is intentional save the settings prior. Change-Id: I994ed256e7b9e88add0c846825a39b298e2644dd
2021-11-07Shortcuts, allow plugins to run through inbuilt file browserWilliam Wilgus1-0/+3
since the plugin browser now exits before running plugins it has already loaded the dest data for the plugin the plugin will be run from the root menu with the open_plugin run key BUT, since the calls originated from the shortcuts menu it overwrites the run key with its own this patch allows the shortcuts menu to overwrite the dest key as well so it can run the loaded plugin Change-Id: I63912071d720df01c6fda25d92d9541818e52a43
2021-11-07root_menu.c fix recent regression for shortcuts add resume for pluginsWilliam Wilgus1-7/+31
recent changes broke shortcuts when they originated from the root menu I mistakenly thought GO_TO_ROOT only happened at start and otherwise was GO_TO_PREVIOUS this commit also adds a few missing features for Start In Previous to resume the last plugin running at shutdown Additionally GO_TO_ROOT now overwrites the global last_screen so you can return to the main menu on next startup Change-Id: I86bf842616e25dc3d4f684ff9d476e6a5ba96b04
2021-10-31exit file browser before running pluginsWilliam Wilgus1-31/+26
now that the plugin browser is resumable exit it before running plugins this causes a problem with the open plugin shortcuts that call other plugins but its now handled in count limited loop so plugins can run plugins in a chain and overall with less overhead too.. the problem remaining -- the plugin exits on USB, returns to ROOT the browser resumes the directory next time you select plugins making for an unwanted auto return Change-Id: If401f698207cbae824e95d69a378f13456a5dee4
2021-10-29PLUGINBROWSER make resumableWilliam Wilgus1-17/+49
make the plugin browser remember the last item between invocations this has bugged me for the longest time dealing with the plugin_menu Fix a very old bug fix for reloading lang strings in the lang menu FS#8117, sending multiple ENTER_MENU_ITEM callbacks from different areas of the code makes it hard to keep track of where your callback is originating Change-Id: Ib0a61558c11ee4c772134378a7020ac0e10fc4ee
2021-10-24root_menu fix red for devices with RTC_ALARM but no tuner or recordingWilliam Wilgus1-1/+5
Change-Id: I36b21c3d1ef4a4ce3b275a0ee793fbf9538b69ae
2021-10-23root_menu.c code clean up -- stir the ifdef mess?William Wilgus1-54/+84
Change-Id: Ia0a847b5552766e5c78dd2ab00d019e631d600aa
2021-10-16Open Plugins search by langidsWilliam Wilgus1-1/+2
On language change Stored plugins may fail to run due to hashing on lang dependent string allows searching by langid when the supplied key is LANG_PTR Fixes error on hash flush where previous entry was not restored Adds routine to update file in-place (for ATA targets) Other targets make a temp file to copy entries breaking changes: ROCKBOXDIR is no longer hashed since /.rockbox directory may soon be able to be changed packed attribute added to op data structure -- oops Change-Id: Ieead26609559b9c5bdadc6a95227cb2bfbb9f71c
2021-08-03open_plugins bugfix failure to saveWilliam Wilgus1-2/+2
if you added a plugin through the core settings and then used the shortcut immediately the entry would never get flushed to disk Change-Id: I62e876bbf0a8fa96acba1cc2582e2563401547f1
2021-03-18shortcuts menu bugfix wps context plugin fallthroughWilliam Wilgus1-1/+2
if you ran a plugin from shortcut menu that originated from the WPS next time you pressed select in the wps it would attempt to run the wps context plugin Change-Id: Id72eb6a20522586efeb479aea0b1c50b53942346
2021-03-18Open Plugin cache plugin entry when possibleWilliam Wilgus1-0/+3
leave plugin entries in ram and try not to save them unless necessary doesn't use more space just a bit of careful ordering with the buffer Change-Id: I1973e9ad4655c2544f596b37cee35601a0cffa94
2021-03-08Shortcuts Menu UpdateWilliam Wilgus1-0/+12
Change Browser shortcut to the plugin icon drop back into WPS on opx return allow same action to exit shortcut menu as entered -- might be problematic Change-Id: Id7013a514c8e8862ee1da44b033d10b7519e9127
2021-03-07Shortcuts.c -- UpdateWilliam Wilgus1-13/+19
Fix returns from shortcuts -- should now run plugins Fix formatting of file names to remove path from browser shortcuts Change-Id: I46e337110d04b84bedcb0c2945d5dd29a1860847
2020-09-18Headphone / lineout pause/resume #FS13237William Wilgus1-3/+12
Allow Lineout to behave like headphone port in regards to plug/unplug pause/resume Change-Id: I9cb2c9c40e0bdf3bf7e1e272164acd343f6b3850
2020-08-17Add open_plugin to coreWilliam Wilgus1-14/+32
open_plugin allows arbitrary plugins to be called in hotkey and start screen replaces PictureFlow Integration shortcuts menu plays plugins now too rather than store paths and parameters in the settings that reside in memory instead entries in a file are searched by hash. after all, the plugin has to be loaded from disk anyways ---------------------------------------------------------------------------- shortcut_viewer.rock-- can now call plugins rather than taking you to them in the browser ----------------------------------------------------------------------------- Added a new option to menus: F_CB_ON_SELECT_ONLY instead of option callback every time a item is accessed F_CB_ON_SELECT_ONLY fires callback only when item is selected ----------------------------------------------------------------------------- Added manual entries ----------------------------------------------------------------------------- Change-Id: I078b57b1d2b4dd633c89212c1082fcbc1b516e6a
2020-08-16root_menu move tag cache init check to pictureflow pluginWilliam Wilgus1-27/+13
let pictureflow decide if the tag cache is ready instead of core Change-Id: I2ab9b375d773dbbc28ea41fbf7bb6fb361ace8fd
2020-07-24[1/4] Remove SH support and all archos targetsSolomon Peachy1-18/+0
This removes all code specific to SH targets Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-19do_menu pass internal synclist reference to callbackWilliam Wilgus1-2/+7
keep running into the rigid nature of do_menu it isn't too bad when you don't need voice but once you do the fun awaits do_menu likes to talk on menu enter which is in a loop when you use do_menu I would like to move the processing to the callback TOO BAD you only get an action and the menu_item_ex struct you sent it when calling the function Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
2019-09-20Bug fix dynamic menusWilliam Wilgus1-2/+3
Dynamic menus had a buffer_len variable in the parent function but it was discarded before passing to the callbacks Why!!?? No clue but everything that used it was assuming MAXPATH Wouldn't be surprised to see some bugs pop out from this one.. init_menu_lists() was assuming MENU_HAS_DESC and setting the menu title + icon based on such even though it could be invalid didn't see anywhere in the code that was currently using MENU_DYNAMIC_DESC in relation to a top level menu but considering it caused all kinds of corruption to the menu when I tried its probably been tried and abandoned before... Change-Id: I8d961d748918bfa8ea6adb5ad60491af4d739d6e
2019-08-13Tweak how the pictureflow plugin is invokedSolomon Peachy1-8/+19
- Only load when database is ready - Assign to file browser only when returning to WPS - Minor speech fixes Patch by Igor Poretsky Re-synchronized by myself Change-Id: If9c943b3af415a2decd3dd5803d730bd790d09fe
2015-02-02iBasso DX50/DX90: Major code cleanup and reorganization.Udo Schläpfer1-2/+2
Reorganization - Separated iBasso devices from PLATFORM_ANDROID. These are now standlone hosted targets. Most device specific code is in the firmware/target/hosted/ibasso directory. - No dependency on Android SDK, only the Android NDK is needed. 32 bit Android NDK and Android API Level 16. - Separate implementation for each device where feasible. Code cleanup - Rewrite of existing code, from simple reformat to complete reimplementation. - New backlight interface, seperating backlight from touchscreen. - Rewrite of device button handler, removing unneeded code and fixing memory leaks. - New Debug messages interface logging to Android adb logcat (DEBUGF, panicf, logf). - Rewrite of lcd device handler, removing unneeded code and fixing memory leaks. - Rewrite of audiohw device handler/pcm interface, removing unneeded code and fixing memory leaks, enabling 44.1/48kHz pthreaded playback. - Rewrite of power and powermng, proper shutdown, using batterylog results (see http://gerrit.rockbox.org/r/#/c/1047/). - Rewrite of configure (Android NDK) and device specific config. - Rewrite of the Android NDK specific Makefile. Misc - All plugins/games/demos activated. - Update tinyalsa to latest from https://github.com/tinyalsa/tinyalsa. Includes - http://gerrit.rockbox.org/r/#/c/993/ - http://gerrit.rockbox.org/r/#/c/1010/ - http://gerrit.rockbox.org/r/#/c/1035/ Does not include http://gerrit.rockbox.org/r/#/c/1007/ due to new backlight interface and new option for hold switch, touchscreen, physical button interaction. Rockbox needs the iBasso DX50/DX90 loader for startup, see http://gerrit.rockbox.org/r/#/c/1099/ The loader expects Rockbox to be installed in /mnt/sdcard/.rockbox/. If /mnt/sdcard/ is accessed as USB mass storage device, Rockbox will exit gracefully and the loader will restart Rockbox on USB disconnect. Tested on iBasso DX50. Compiled (not tested) for iBasso DX90. Compiled (not tested) for PLATFORM_ANDROID. Change-Id: I5f5e22e68f5b4cf29c28e2b40b2c265f2beb7ab7
2014-09-18Introducing Targets iBasso DX50 & iBasso DX90Simon Rothen1-2/+2
The port to for this two targets has been entirely developped by Ilia Sergachev (alias Il or xzcc). His source can be found at https://bitbucket.org/isergachev/rockbox . The few necesary modifications for the DX90 port was done by headwhacker form head-fi.org. Unfortunately i could not try out the final state of the DX90 port. The port is hosted on android (without java) as standalone app. The official Firmware is required to run this port. Ilia did modify the source files for the "android" target in the rockbox source to make the DX port work. The work I did was to separate the code for DX50 (&DX90) from the android target. On this Target Ilia used source from tinyalsa from AOSP. I did not touch that part of the code because I do not understand it. What else I changed from Ilias sources besides the separation from the target "android": * removed a dirty hack to keep backlight off * changed value battery meter to voltage battery meter * made all plugins compile (named target as "standalone") and added keymaps * i added the graphics for the manual but did not do anything else for the manual yet * minor optimizations known bugs: * timers are slowed donw when playback is active (tinyalsa related?) * some minor bugs Things to do: * The main prolem will be how to install the app correctly. A guy called DOC2008 added a CWM (by androtab.info) to the official firmware and Ilia made a CWM installation script and a dualboot selector (rbutils/ibassoboot, build with ndk-build). We will have to find a way to install rockbox in a proper way without breaking any copyrights. Maybe ADB is an option but it is not enable with OF by default. Patching the OF is probably the way to go. * All the wiki and manual to build: needed: android ndk installed, android sdk installed with additional build-tools 19.1.0 installed ./tools/configure select iBasso DX50 or iBasso DX90 make -j apk the content of rockbox.zip/.rockbox needs to be copied to /system/rockbox/app_rockbox/rockbox/ (rockbox app not needed) the content of libs/armeabi to /system/rockbox/lib/ (rockbox app needed) The boot selector is needed as /system/bin/MangoPlayer and the iBasso app as /system/bin/MangoPlayer_original. There is also the "vold" file. The one from OF does not work with DX50 rockbox (DX90 works!?), the one from Ilia is necessary. Until we have found a proper way to install it, it can only be installed following the instructions of Ilia on his bitbucket page, using the CWM-OF and his installation script package. Change-Id: Ic4faaf84824c162aabcc08e492cee6e0068719d0 Reviewed-on: http://gerrit.rockbox.org/941 Tested: Chiwen Chang <rock1104.tw@yahoo.com.tw> Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2014-08-30Rewrite filesystem code (WIP)Michael Sevakis1-3/+2
This patch redoes the filesystem code from the FAT driver up to the clipboard code in onplay.c. Not every aspect of this is finished therefore it is still "WIP". I don't wish to do too much at once (haha!). What is left to do is get dircache back in the sim and find an implementation for the dircache indicies in the tagcache and playlist code or do something else that has the same benefit. Leaving these out for now does not make anything unusable. All the basics are done. Phone app code should probably get vetted (and app path handling just plain rewritten as environment expansions); the SDL app and Android run well. Main things addressed: 1) Thread safety: There is none right now in the trunk code. Most of what currently works is luck when multiple threads are involved or multiple descriptors to the same file are open. 2) POSIX compliance: Many of the functions behave nothing like their counterparts on a host system. This leads to inconsistent code or very different behavior from native to hosted. One huge offender was rename(). Going point by point would fill a book. 3) Actual running RAM usage: Many targets will use less RAM and less stack space (some more RAM because I upped the number of cache buffers for large memory). There's very little memory lying fallow in rarely-used areas (see 'Key core changes' below). Also, all targets may open the same number of directory streams whereas before those with less than 8MB RAM were limited to 8, not 12 implying those targets will save slightly less. 4) Performance: The test_disk plugin shows markedly improved performance, particularly in the area of (uncached) directory scanning, due partly to more optimal directory reading and to a better sector cache algorithm. Uncached times tend to be better while there is a bit of a slowdown in dircache due to it being a bit heavier of an implementation. It's not noticeable by a human as far as I can say. Key core changes: 1) Files and directories share core code and data structures. 2) The filesystem code knows which descriptors refer to same file. This ensures that changes from one stream are appropriately reflected in every open descriptor for that file (fileobj_mgr.c). 3) File and directory cache buffers are borrowed from the main sector cache. This means that when they are not in use by a file, they are not wasted, but used for the cache. Most of the time, only a few of them are needed. It also means that adding more file and directory handles is less expensive. All one must do in ensure a large enough cache to borrow from. 4) Relative path components are supported and the namespace is unified. It does not support full relative paths to an implied current directory; what is does support is use of "." and "..". Adding the former would not be very difficult. The namespace is unified in the sense that volumes may be specified several times along with relative parts, e.g.: "/<0>/foo/../../<1>/bar" :<=> "/<1>/bar". 5) Stack usage is down due to sharing of data, static allocation and less duplication of strings on the stack. This requires more serialization than I would like but since the number of threads is limited to a low number, the tradoff in favor of the stack seems reasonable. 6) Separates and heirarchicalizes (sic) the SIM and APP filesystem code. SIM path and volume handling is just like the target. Some aspects of the APP file code get more straightforward (e.g. no path hashing is needed). Dircache: Deserves its own section. Dircache is new but pays homage to the old. The old one was not compatible and so it, since it got redone, does all the stuff it always should have done such as: 1) It may be update and used at any time during the build process. No longer has one to wait for it to finish building to do basic file management (create, remove, rename, etc.). 2) It does not need to be either fully scanned or completely disabled; it can be incomplete (i.e. overfilled, missing paths), still be of benefit and be correct. 3) Handles mounting and dismounting of individual volumes which means a full rebuild is not needed just because you pop a new SD card in the slot. Now, because it reuses its freed entry data, may rebuild only that volume. 4) Much more fundamental to the file code. When it is built, it is the keeper of the master file list whether enabled or not ("disabled" is just a state of the cache). Its must always to ready to be started and bind all streams opened prior to being enabled. 5) Maintains any short filenames in OEM format which means that it does not need to be rebuilt when changing the default codepage. Miscellaneous Compatibility: 1) Update any other code that would otherwise not work such as the hotswap mounting code in various card drivers. 2) File management: Clipboard needed updating because of the behavioral changes. Still needs a little more work on some finer points. 3) Remove now-obsolete functionality such as the mutex's "no preempt" flag (which was only for the prior FAT driver). 4) struct dirinfo uses time_t rather than raw FAT directory entry time fields. I plan to follow up on genericizing everything there (i.e. no FAT attributes). 5) unicode.c needed some redoing so that the file code does not try try to load codepages during a scan, which is actually a problem with the current code. The default codepage, if any is required, is now kept in RAM separarately (bufalloced) from codepages specified to iso_decode() (which must not be bufalloced because the conversion may be done by playback threads). Brings with it some additional reusable core code: 1) Revised file functions: Reusable code that does things such as safe path concatenation and parsing without buffer limitations or data duplication. Variants that copy or alter the input path may be based off these. To do: 1) Put dircache functionality back in the sim. Treating it internally as a different kind of file system seems the best approach at this time. 2) Restore use of dircache indexes in the playlist and database or something effectively the same. Since the cache doesn't have to be complete in order to be used, not getting a hit on the cache doesn't unambiguously say if the path exists or not. Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8 Reviewed-on: http://gerrit.rockbox.org/566 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
2014-04-15root_menu: Remove previous_music_is_wps() and change previous_music via ↵Thomas Martitz1-15/+23
event callback. Change-Id: I0f3b85a8fe8010a2480ef44a72a90dc7904bc777
2014-03-14events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz1-2/+3
add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-10Implement time-based resume and playback start.Michael Sevakis1-0/+1
This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
2014-02-23Move VOL_NAMES definition to mv.hThomas Martitz1-1/+1
Fits better and including dir.h is more messy for some places. Change-Id: I3ec30dcc1ac2734ad3844c903238b6cc2f4e134c
2014-02-13main_menu_config: New plugin to configur the main menu orderJonathan Gordon1-4/+8
Plugins/Applications/main_menu_config allows you to edit the main menu order without having to manually edit config.cfg. Press the standard OK button to access the internal menu which allows you to move items up/down in the order and toggle their visibility. Exit via this menu to have the order saved. (Suggestions welcome to improve this UI) Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
2013-11-20Introduce volume_{present,removable} and fix invalid calls in apps/Amaury Pouly1-2/+3
The code was trying to probe for volume presence by calling drive layer with volume index. It is a miracle it get unnoticed so far. Introduce proper volume probing using the vol->drive map in the disk layer. Change-Id: I463a5bcc8170f007cad049536094207d2ba3c6fc Reviewed-on: http://gerrit.rockbox.org/669 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-07-13Get rid of some superfluous single-purpose functions in playback.Michael Sevakis1-1/+1
* Remove explicit tracking of elapsed time of previous track. * Remove function to obtain auto skip flag. * Most playback events now carry the extra information instead and pass 'struct track_event *' for data. * Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes it cleaner and removes the struct mp3entry. Change-Id: I500d2abb4056a32646496efc3617406e36811ec5
2013-01-02Use crc32 of filename to resume tracksRichard Quirk1-2/+4
As well as using an index, which breaks when a file is added or removed, use the crc32 of the filename. When the crc32 check passes the index is used directly. When it fails, the slow path is taken checking each file name in the playlist until the right crc is found. If that fails the playlist is started from the beginning. See http://www.rockbox.org/tracker/6411 Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: http://gerrit.rockbox.org/372 Tested-by: Jonathan Gordon <rockbox@jdgordon.info> Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
2012-12-16root menu setting: make the setting handles whitespaceJonathan Gordon1-41/+44
Change-Id: Id981bb518017e272dd7a230ae7d799ef0f55847c