Seems a bit clearer to me than redefining the meaning
of ONPLAY_OK in this context, which was easy to miss.
Fixes the return value for the bookmark_create_menu
hotkey, too. It was previously mapped to ONPLAY_OK
in case the function failed, and to ONPLAY_RELOAD_DIR
if it succeeded. This had no ill effect - or any effect –
since either of the values were disregarded by the WPS
when executing a hotkey.
Return values of playlist_insert_shuffled also had no
effect (by design, apparently, see commit 482b45b).
Use ONPLAY_FUNC_RETURN in hotkey_assignment.
Behavior hasn't changed, it's only been made more
explicit.
Change-Id: Iefc60c9f42c1063af78d368dc382916848064d38
there are a lot of duplicated voiceclips in the inbuilt_filetypes struct
its already looked up so deduplicate
Change-Id: I7846277d2da308f605d5564e9081d6077e697239
there are a lot of duplicated icons in the inbuilt_filetypes struct
its only used at load so deduplicate and look-up by attr
Change-Id: I5eb34e5243d88688984f689e0add08f92d953a6f
since int_setting is the largest struct in the union of settings
saving 32 bytes adds up over every setting
frees ~200 bytes
Change-Id: Id4722262e40db3021c740e138fe7352be10e2c70
- Extract functions for
* determining whether it's a file or dir
* showing stats for dir or file without id3
- Remove typedef for struct
- Fix unit string not being displayed correctly during scanning
(use %s instead of %cB)
Change-Id: I31440ebd96bca791a96c66511c3de9727608218a
save some space by allowing printf formatting directly rather than
having a buffer and using sprintf
Change-Id: I049c8f898fb4a68a26ad0f0646250c242647ba12
HOTKEY_PLUGIN action resulted in return value
of void function being assigned and then returned
by execute_hotkey.
Change-Id: I8b141e878fc2c0b09070186fc3520314c18a83b0
After calling up PictureFlow from the database or from the
Playlist Viewer, you would not be returned to the WPS as
would be expected when picking a new song, selecting
"Go to WPS" or pressing the WPS action button.
Change-Id: I902ac9185ebe092d0c4c08804db0a813a32cc39c
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
We already know the viewport at render time (I think... at least
this seems to be the case for themes I tested) so there's no need
to store a pointer to the viewport.
Change-Id: I75fa2262e96c6f735e6b5da33cd4ca9ac68cd2ee
The function isn't used except for the skin engine's %Vf/%Vb tags,
so inline it there and remove the separate function.
Change-Id: Ia207321877234bc3679457c820a4292ae53f3520
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
you could return values in the event callbacks that would never be processed
this would eventually cause a lua stack overflow
settop(0) eats all return values (if any)
Change-Id: Icac6b27e592b385421275d4bd899ed3fe1065669
There's probably little benefit to using core_alloc_maximum() for
loading playlists since they are parsed incrementally. I/O speed
does not increase with increased read sizes beyond a certain point.
Read by 32 KiB chunks since that is what the buffering thread does.
Fall back to core_alloc_maximum() if a small allocation fails so
that buflib will try harder to free up space.
Change-Id: I08b94317d12b98af09ef2bd84aa1195c4c51d1b1
there isn't much difference from this function to strtok_r
now places a NULL in the last vector space permitting as well
Change-Id: Ibaaa1ad01b5054c41a6410788a2333b8d11a7cf7
Commit 034b6d5b prevented other Settings menus
on the same menu level from being displayed after
accessing one item's context menu
Change-Id: I378e1748b7f449ad34042a3c8c626488fc07a7d4
A bunch of public API calls take a wps_data struct argument,
but that's an internal type that doesn't have a direct getter.
Instead the skin engine provides a gui_wps struct as a way
to refer to a particular skin instance. Use that instead of
wps_data in the public API.
Change-Id: I13e1aa8df7f08ccfb789bb728d493ac8d7de1a9b
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
Not sure if this is worth the added bin size yet but I will
see where I can use it to try and make it worth it
Change-Id: Icc299d3986172ff224a14be48da3bf065d728a66
The database only remembered what you'd selected when
ascending the menu hierarchy again from a lower level.
Now it restores a previous selection going in the other
direction as well, when you enter a new menu, as long
as the selection at the current level hasn't changed.
Change-Id: I5068287ff758a7cfebf1428e9b0ffd30e6ef541e
- gui_synclist_select_item will be called in the update_dir
function by dirbrowse()
- it is unnecessary to call when the tables opened by
tagtree_enter are not being displayed but are only being
used for inserting table contents into the current playlist.
Change-Id: Ib768b457b2baa7eb85cf73c6339fd4f603d03d90
Useful feature for audiobooks. To rewind from the end of the previous track - press rewind at the very beginning of the current track. So if you are in the middle of the track - first rewind till beginning then release and press rewind button again (Playback Settings -> Rewind Across Tracks option should be enabled)
Fixes FS#13290
Change-Id: I5d7f06f64ad76d1e8f7827fe594ccca5f621769d
splits on spaces also considers \r\n\f\v\t as mandatory breaks
I'm still working on the strptokspn function
my goal is to use it directly rather than storing the matched char
and modifying the source string with \0 in order to tokenize the output
--Done
Change-Id: I7f378b5b9c4df8f10899b9a55a98950afb3931dc
I have no idea what bug this could possibly "fix", and nothing
looks different on the sim after removing it. As far as I can tell
the Onda has no unique features that could cause the skin engine
to act flaky, so I'm willing to bet this workaround isn't needed.
Change-Id: I2c183786948f3fe9778e04134d04bdfe3c6db543
remove some unused calls and save some space by only grabbing font h once
it doesn't change throughout the function
Change-Id: Iec3b8b34150d15b36062cba59c8d365b751bd0f6
since its too early for the scroll engine just remove 'ver. '
cleanup the getstringsize calls, only need to calculate it once
Change-Id: I5e866733ed38ffa0bf34ce1b5e11ed3afd78a04a
Rockbox would go to a previously selected
menu instead of returning to the current one
when leaving the Shortcuts screen.
Change-Id: I3546e32def9124956cd9edc258e14db91d19fa22
getstringsize on SEPARATOR was overwritten by another call to
getstringsize
lang files use position to decide target strings 'RTC' was after targets using
different buttons therefore in error gained precedence
Change-Id: I40edc6c99140ac81bffd4c47d5e055ebc94ab1b2
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
It makes it behave consistently with tree/playlists other menus. So it's possible to exit Shortcuts using Back button on Clip Zip or Power button on Rocker
Change-Id: I8a52422ed2d96d0727ddacf364f87878735c6e4c
Resuming a track with "Resume Playback" or a bookmark is supposed
to pass both the file offset and elapsed time to the codec. Since
commit dfff938dff the offset has been getting zeroed because the
buffer handle wasn't open at the time of the buf_filesize() call,
causing it to return a negative error code.
Having a valid offset improves resume accuracy with some codecs,
like VBR MP3.
Change-Id: I8af7f001644f1ee1bd27ca3049a4cff2d2274149
The File Browser and Database apparently share
the same selected_item_history, which means that
selected_item can be -1 even in the context of the
database,
This leads to tree_get_file_position being called in
id3db mode, which isn't safe to do.
Change-Id: I46151e8a823afab0b57ad839cde13f6072b8917b
The current value of 32 per handle seems excessive. Buflib overhead
per handle is only 20 bytes and a single shortcut is > 500 bytes.
Reducing SHORTCUTS_PER_HANDLE means that minimum memory usage can
be lower when there are a few shortcuts, at the cost of marginally
increased usage for large numbers of shortcuts. This is helpful to
keep memory usage under control for low-memory targets, where 16 KiB
is almost 1% of system RAM!
Change-Id: I47dbe0da874ae512cf50a0bd8350576ab2fabdf4
32 bytes is a little small, and it's also good to have extra
space to accommodate non-English languages.
Change-Id: Iced38fd5140e219b16dcfa6d30cc4191266926bd
Offers a quick way of switching to the Shortcuts Menu
by pressing the 'context menu' button while QuickScreen
is active (e.g. long press Select on iPods and some other
players)
Change-Id: I38292c7070cf093a81e1db688809b1f0d6a8764a
- Fix FPS counter overlapping
the artist string when
"Show album title" was set to
"Show album and artist at the top"
- Fix disappearance of center album
if certain Settings menus had been
accessed while list of tracks was
showing and you then returned to the
list of albums
- Fix disappearing album artwork after
cache had been created until you started
scrolling
- Enable context menu even if WPS
integration is disabled
- Make splash screen appear only
on first launch and for database
updates, when it is actually on screen
for long enough
- Eliminate 'Loading' splash if tagcache
is in RAM
- Show both album and artist by default on
displays whose height > 100px
Change-Id: Ie70c0d9093789294d288a4f88338ee4a588bf4a5
- With "Play Selected First" and "Shuffle" enabled,
another item was randomly selected when returning
to the list. This appears to be a bug
- With "Play Selected First" disabled, the first item was
selected. This appeared to be intentional, since, at least with
"Shuffle" disabled, that is the item that was played
back. This may not be helpful either, since it makes you lose
your place in what can be a long list. It is also not
consistent with the behavior of the File Browser. The current
selection should probably be maintained in all cases.
- At least according to the manual and the behavior of the File
Browser, "Play Selected First" should only apply when "Shuffle"
is enabled.
Change-Id: Ic1205477d5bf8b22f8f32dd6d31d3b9ceb5a2d24
4f83e66 (FS#13287) introduced a useful option to
immediately re-load the saved dynamic playlist, so that
bookmark creation becomes possible.
(Current Playlist->Reload After Saving)
It seems unnecessary and won't produce the intended
effect to autoload bookmarks after the playlist is saved,
since playback position will be restored to where
it was previously.
Additionally, with "Load last Bookmark" set to "Ask",
the dialog for choosing a stored bookmark will appear
after the playlist has been saved. The dialog is
unwanted, since:
- Selecting a bookmark doesn't have expected effect
- Selecting "Don't resume" will actually resume
- Cancelling out of the screen will prevent the
saved playlist from being loaded, without this being
obvious to the user
- It causes a crash if the dynamic playlist is saved
from within the Playlist Viewer (both the Playlist Viewer
and the bookmark selection screen use the plugin
buffer)
Change-Id: I7d696e56c89394b3cd10ef6acfed4ddc7e814118
Drop wps_internals.h from skin_engine.h. The WPS and to a lesser
extent the radio screen are too tightly integrated to drop their
dependency on wps_internals.h, unfortunately. Skinned lists, for
obvious reasons, also need access to the internals.
Change-Id: I00a55aa423900f9ad22edccbe2fc1910af380e38
the GUI_EVENT_NEED_UI_UPDATE event was not canceled till
after the call to scroll_stop this resulted in the scrolled line
being re-added after the function was done causing a crash
thanks spork, amachronic
Change-Id: I2e484a2b877f6da63171eb997f62a21e95ca9bfc
Several places in the codebase implemented an ad-hoc form of pinning;
they can be converted to use buflib pinning instead.
Change-Id: I4450be007e80f6c9cc9f56c2929fa4b9b85ebff3
allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
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
Only the "Rockbox Info" screen uses it for a rather silly purpose,
so remove the function. This helps to decouple things from the GUI.
Change-Id: Icf73e3ee1230c75bf43016c0f1c05c7fe1a24895
Get rid of the "limit_scroll" member from lists and make it a
local variable of gui_synclist_do_button().
Bump plugin API version since struct gui_synclist was changed.
Change-Id: Ie3244a85e5a1022a2f6e238a506fdbba67724962
Removing the "list_wrap" argument is actually pretty easy.
In practice, almost all lists are using LIST_WRAP_UNLESS_HELD
behavior so we can make that the default. A couple of lists
disable wraparound with LIST_WRAP_OFF; this is now achieved
by setting the list "wraparound" flag to false when setting
up the list. LIST_WRAP_ON was unused and is of questionable
value, so it has been removed entirely.
This makes list wraparound behavior a property of the list,
controlled solely by the "wraparound" flag. The result is a
simpler list API and implementation, without changing the
behavior of any lists.
Change-Id: Ib55d17519e6d92fc95ae17b84ab0aaf4233bcb5a
Since gui_synclist_do_button() overrides the setting at runtime
there is no reason to have a public API call to set it. Really
it should be a local variable, but it will be simpler to do that
after refactoring how list wraparound behavior is handled.
Change-Id: Id09d42197814102693752a9f64db8325118ca796
gui_list_screen_scroll_step() and gui_list_screen_scroll_out_of_view()
just copy the global setting into a local static variable.
Since they don't do anything special when the setting changes
it's simpler to use the global setting directly.
Change-Id: Ib6a7bf4e09b6dabbc1597cf28ddbafc0bc857526
The implementation of the "show_selection_marker" option in
lists isn't great. It's a cosmetic option used to hide the
selection, but it causes the list to do funny things to the
selected_item and doesn't play nice with voiced menus, since
these rely on the selection to determine what item is spoken.
There are only two user-facing lists that use the option, the
"Rockbox Info" screen and a menu in the superdom plugin. The
rest are debug screens, and cosmetics don't matter much there.
Given how little used the option is, and its issues, removing
it seems reasonable.
Change-Id: I2c70b3e4c74ff3cc6dbac46366a371d271dd2d58
Use const char* pointers for list titles. Only one debug menu
actually modifies the title, and in that case it's legal to
cast away const because the title points to a known mutable
buffer on the stack.
Change-Id: Idb8ab307b9a6ec23a93d8420c5e19fafd9f59c30
The %Vs(color) tag doesn't set the text style properly and causes
the background to not be cleared when rendering lines. For static
text this is rarely a problem, but for scrolling text it'll cause
the text to "smear" once it starts scrolling.
Fix this by setting STYLE_DEFAULT, so the background gets redrawn
when the line scrolls.
Bug report: https://forums.rockbox.org/index.php/topic,54320.0.html
Change-Id: I835c806005ea40fd6bac3692e52a9c325581a293
Instead of putting "#ifdef LCD_STRIDEFORMAT" at every usage of the
macro it's simpler to have config.h define LCD_STRIDEFORMAT to the
default of horizontal stride when the target leaves it unspecified.
Change-Id: Ib187012aad65ac678dbd837b1464a83bad722411
Have action.c control the key remap buflib allocation so that it can
be made movable. With memory management offloaded, core_keymap.c only
needs to deal with loading keymap files. Simplify the code there and
use buflib pinning so the file can be loaded directly into the buffer.
Change-Id: Ia654cc05ce6b286f96c1031fa4f7d4b3859a2c1a
* added scroll wheel to doom
* added scroll wheel to brickmania
* changed spacerocks to use scroll wheel instead of buttons
Change-Id: I9d6ff0b4c5deea147178f5cd9f96ae435e7b5cd8
Shuffle and Unshuffle commands are not flushed to
disk when control data is updated. The same applies
to Delete and Reset commands, unless HAVE_DIRCACHE
is undefined (see update_control() function in playlist.c)
playlist_resume() discards cached control data.
This resulted in a bug where (e.g.) removed tracks
from the current playlist would reappear if you stopped
and resumed playing immediately afterwards (instead of
restarting in between).
Change-Id: I273f61e823a1d99426a18079b81aa07915620f30
The disk doesn't need to spin up when the
database is in RAM. Results are usually returned
without any noticeable delay, so the splash only
creates distraction.
Change-Id: I04e5b7d2e00f045143dd86e0561091be3d8f9724
I noticed a stack overflow on the Fiio M3K when launching
PictureFlow from the Playlist Viewer after opening a playlist
from the file browser using the context menu's "View" option.
Change-Id: Id87fb59e36518bd7ceb61f886d5759fc3206aadf
'File Browser' hotkeys can now be used while
browsing a playlist.
The manual has been updated to reflect this and
to say that the File Browser hotkey works in
the context of the database as well (existing
behavior)
Change-Id: I51b23e82e0fb00772efdb8784db966d454fb2560
(The playlist viewer has to be re-initialized
after returning from PictureFlow, since they
both use the plugin buffer)
Change-Id: Ib3ef0acec65c88363830c59c8c73e9cdf8b528f0
This seems to be what is provided by the database when length
of path+file name of an entry is larger than MAX_PATH.
Change-Id: Iaf40ce945732a8a8c2e5270a80886dcb537a72be
USB ask mode is basically a footgun: it can't work on native targets
and doesn't work reliably on hosted ones, and it continually produces
a slow trickle of problems. FS#13317 gives a rundown of the issues.
Removing the setting seems like the best solution for now, since a fix
would be pretty involved.
This partially reverts 60f581e8f5. The USB Mode setting is left in
place so the option can be added back later in a non-buggy way.
Change-Id: Ie01b28dd2ed95a31b509a7834d85bac8eb866098
Updated version of the patch originally by user cockroach
UNTESTED
Ipods?, Iriver H10,
I do not own these players so YMMV
https://www.rockbox.org/tracker/task/13193
Change-Id: I7924837f582cc5c49ee68c186d6822f577f65147
add settings to the scrobbler plugin
Start Playback -- resume playback at plugin start
(while enabled if nothing to resume will bring you back to scrobbler menu)
Save Threshold 0-100% -- when this much time has passed the track will be
saved and marked (L)istened
Verbose -- Supress messages such as 'Scrobbler Started' and 'Scrobbler Flushed'
run the plugin a second time to bring up the menu
if you have resume playback enabled and there is nothing to resume
it brings you back to the scrobbler menu as well
Change-Id: I48d96ea3dc8f37d76a723136004af149429e0b2e
Use standard menus and yes/no screen for the TSR exit callback,
similar to the recently added test_usb plugin. This removes the
need to define key bindings and it provides a more consistent
user experience.
It also allows the "flush cache" message to be popped up in the
main thread - doing it from the worker thread is unreliable and
the message often disappeared because the main thread did a UI
update immediately after leaving the plugin.
One issue is that quitting the plugin by selecting the scrobbler
plugin itself immediately restarts the scrobbler. This is because
there is currently no way for TSR plugins to terminate themselves
either through the exit_tsr callback or otherwise.
Change-Id: I9690239d5bd58ad2fbb36fd15a10683757aff0ff
The artwork cache was previously always rebuilt,
even if you had selected the option to update.
"Preparing artwork" should be much quicker now
after a database update.
Change-Id: Ie81486e29d596b52afd21b01ba54c73f1b402be2
This is intended for testing USB event delivery to TSR plugins.
Usage:
1. enter plugin -> select Start
2. plug and unplug USB
3. reenter plugin -> select Status
it should display "State: disconnected" then "Prev: connected"
4. when done -> select Stop Plugin
Change-Id: I6c70f452db642f3fcbfbcb4f06c57f93e60f4cfd
When replacing a dynamic playlist with Play Shuffled, the current
track could incorrectly be left at the end of the new playlist.
Fix this - the current track should always be at the beginning,
so it can be skipped past regardless of the repeat/shuffle mode.
Change-Id: Ia86539bc23ad8ebd714b8dc50b5720671b4ad0a9
Add a setting that makes Play and Play Shuffled in the playlist
context menu leave the current song (if any) playing when they
replace the playlist. Default to on, since this was the behavior
of the old "Clear List & Play Next" option.
Change-Id: I1340aed5c28bb3244e36d0953b3308ae59681c97
Rename the "Clear List & Play" options to simply Play and Play
Shuffled, and change their behavior slightly. Previously they
would leave the current song playing, but now they will start
playing the first song of the new playlist immediately.
Shuffle options are now consistently hidden whenever a single
file is selected.
Fixes FS#13336 -- Play Shuffled is now always displayed where
applicable, regardless of playback state.
Change-Id: Idd454b4f9ab2c98cda3ce0389add747a3273fb42
When opening an audio file from the file
browser or database using the Properties
plugin, it will now use existing code from
the Show Track Info screen for displaying
metadata. The menu option has been
renamed accordingly.
Change-Id: I5a824865b9f980151b91aff3c3c18ec45830a12c
I intended to check for enough space in buffer but this isn't
really doing it and it is making aa_bufsz slightly too big so
it's a possible buffer overflow.
Restore the old ALIGN_DOWN(..., 4) rounding in case it's important,
if not, then no harm done.
Change-Id: I904f255ac79a77d5328b44667502ceae8308e659
get rid of the magic buffer size and the whole name buffer
naming the buffers individually doesn't serve any real purpose
instead add a static string for all td buffers
Change-Id: I962a966456453e1b84bab6fec6f4df7cb075ef4e
It was possible for the tag tree's buflib move callback to turn a
null pointer non-null. The tagcache_search_clause->str can be null
for OR clauses. Also ensure that clauses are zeroed on allocation
to ensure garbage pointers don't creep in.
Change-Id: Ic823a8eecc501eeaa75798066521e427a9a89190
A couple of places use sizeof(int) for allocations and copying but
the indices are longs, which causes bugs in the simulator on 64-bit.
Change-Id: Ie101ac57d44217c4b1657cf0152c97e276bd7043
UBSan reports an avalanche of unaligned pointer bugs stemming from
hardcoded 4-byte alignments used in certain places. Use sizeof(long)
instead to align to the machine word size.
Change-Id: I28e505212462c5268afa24e95df3a103ac3e2213
These operations can only be used in limited circumstances and have
exactly one user. bufgettail especially seems of dubious value; how
often do you need to read N bytes from the end of a file without
changing the file position?
strip_tags() was the only function using them, to strip off ID3v1
and APE tags off the end of buffered tracks. This would save only
32-192 bytes per track -- if the container format uses APE/ID3v1.
It hardly seems worth the effort.
Change-Id: I8fc3c1408517eda6126e75e76d76daea904b50eb
According to the on screen instructions, any other button
should mean No.
More importantly, in my experience at least, the Select
"button", since it is touch-activated, can sometimes be
pressed by accident, especially when a warning screen
is displayed as a result of pressing that same button.
Change-Id: Ieeadfa8018b5df99605297bc47948a181c22dab4
np_file is a buffer of size MAX_PATH. After
removing only the file name component and
leaving the rest of the path, the
available space may not be sufficient
for appending another file name (possibly of
size MAX_PATH itself) to it.
This can occur after a file of acceptable
length is opened in ImageViewer, and you
then advance to another file whose path
(including the file name) is longer than
MAX_PATH.
Change-Id: Ideadd9451359bd5735bce92fca5d983e61f300e9
When the 'Album Art' setting was set to
'Prefer Image File' and neither image file
nor embedded artwork were found,
playback would check for files twice.
Change-Id: Ibe392928d58ec04103e2572124841724509bd859
flags were getting un-initialized memory
it really didn't matter with the flags getting initialized
anyway
But once I added a new flag that didn't explicitly
set or clear the flag at init well here we are
set flags to VP_DEFAULT_FLAGS in viewport_set_defaults()
add the flags variable to the default vp's set to 0
(it was already initialized to 0 by bss, make it explicit)
Change-Id: I3a9a062455b4cf66d2b8c70fdf05402a5c0c091c
Frequency, file size, and the codec are not stored
in the database and thus can’t be displayed in the
Playlist Viewer's Track Info screen when metadata
is only retrieved from the database.
Change-Id: I9e1d11c13ad8bf7b90b654ed78e4e7f763c30f8a
Eliminates flashing of slide right after launch or
when changing sorting on the M3K using the
volume buttons
Change-Id: Icd317e0b0d5b939269dc8dafd30d0c0f9daa5fd9
This plugin provides a menu for easily editing the root redirect file
on targets that support multiboot. You can select a new root from a
list of Rockbox installations detected on the filesystem or remove all
redirects to boot from the default location.
To avoid searching the whole filesystem, only subdirectories of the
volume roots are checked for valid installations. Only installations
that are compatible with the current player will be displayed.
Change-Id: I7dcbadfd97873b87817870e61d2ae37956d2da00
Allow a clean shutdown to end in either power off or reboot. Add a
new event SYS_REBOOT to signal it and sys_reboot() to trigger the
event. SYS_REBOOT signals a reboot request and should be listened
for alongside SYS_POWEROFF events.
Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
its really painful needing to override global settings in order to change
some aspects of lists
this patch moves:
[scrollbar position, cursor type,
talk_menus, keyclick,
wrap around, scroll paginated]
to variables within the synclist, it also makes updating
after settings changes a necessity
I think I have the static synclists in core covered
(I think the one in gui/list-skinned can be left as is)
this patch allows easy modification these flags on the fly
Change-Id: Id0dcb8b05eb9ecd78929c0aff7678bf2ab4c70a7
The progress callback doesn't rate limit LCD updates, which causes
excessive slowdowns (up to 150x!) on some targets. Limiting updates
to 20fps solves the problem and should boost load speed across the
board, particularly for large images and animated GIFs that may run
the progress callback thousands of times.
Change-Id: Ia48924d4dcb24c1111509329581809be494d0165
In some circumstances it was possible for a bitmap to overflow its
buffer and overwrite the next handle. The easiest way to trigger it
is with a highly compressed JPEG that is decoded to a large bitmap.
Because the JPEG file size is used to determine how much to allocate
this would cause an obvious buffer overflow when the JPEG is smaller
than the decoded bitmap. Fix this by using the decoded bitmap size as
the allocation size. Some overhead must be added to deal with JPEGs,
but it will be freed once the image is loaded.
A less obvious possibility is the fact that add_handle() will allow
a handle to be added even if there's not enough space for the entire
allocation. This is generally beneficial because it allows the first
part of a file to be loaded while waiting for space to free up, but
for bitmaps it is not valid because the whole image is loaded at once.
Hence if there is not actually enough space in the buffer, the bitmap
load can again overflow the actual free space and overwrite the next
handle.
The buffering code supports an H_ALLOCALL flag for allocations that
need the free space available immediately, so use it for bitmaps to
avoid that bug.
load_image() had a sketchy-looking check for free space which stopped
me from triggering the bug with simple tests, but since guessing the
free space is obviously a bad idea when the caller *knows* how much
free space there really is, remove that guess and let the caller tell
load_image() the real deal.
Change-Id: If62a58759705d83c16ee5b50f26bcbccc3f6c01f
JPEG decoding requires additional space in the bitmap buffer beyond
what is needed for the decoded pixel data. Provide a way to estimate
how much overhead is needed.
The actual overhead is sizeof(struct jpeg) + decode_buf_size, where
the latter depends on the image size and JPEG encoding used. From my
testing decode_buf_size is normally pretty small (under 5 KiB) but
looking at the code it could be large in some cases, primarily with
large images, so 32 KiB seems to be a decent compromise. Someone who
knows better about JPEG should pick a better value if that's too big.
Using a constant is obviously not the most accurate but it seems to
be the simplest option for retrofitting to existing code.
Change-Id: I573b0abb8ca2d79e43f185010487f07226edb793
Not sure what the comment is talking about - signed overflow
is undefined behavior and we don't use -fwrapv or other flags
to make it defined. I can't see how a compiler could abuse it
here, but the overflow is nonetheless easily avoided.
Change-Id: Ibed6d7c0d841db2aa86b9d8ba4c6a0d08c413354
don't stop playback to alloc viewports for the keyboard
For the moment it doesn't make much difference
each vp takes about 40 bytes (double that in the sim?)
so not the end of the world 120 extra bytes
Change-Id: I482d7e3061cf9fb8065dc28bf62a6f830770f3c7
While the track number is limited to 99, I know of no documented
constraint on the value of offset minutes to 99.
As we are storing the millisecond offset as unsigned long, assuming
32 bit, we can allow 70,000 minutes (2^32 / 60000).
However, I've been unable to generate a test audio file 48 days long
under 2GB, so I've set the limit to 30,000 minutes.
In addition, this change reduces the maximum number of seconds to 59,
and frames to 74.
I've generated some silent test files with the filenames being
cue_[minutes].mp3
http://peskett.co.uk/rockbox/test_cues/
Change-Id: I3ca4468ebc88ba134c4e785e9395f90bf76941ac
allows items to be moved around with less code changes
remove scrolling I was not overly impressed with it
add test_kbd plugin
Change-Id: Ic183c7221bda9405891632704f3a7bbfd79bfe83
if you skip a track after the halfway point the scrobbler may double post
with slightly different timestamps but the same track info
take a crc of the non-unique part and check against the previously
written track
Change-Id: I676342c4cd76f632131d9cb6d9f7d2f59df357e6
The comment regarding Windows paths was fairly confusing as to
its intent. What the code is trying to do is replace the drive
letter with the volume containing the playlist, which appears
reasonable. The middle of the comment was devoted to explaining
why the code below was potentially incorrect which only served
to add to the confusion.
AFAICT the last volume specifier in a path will cause search to
start from the root of that volume, so any incorrect result can
be avoided by using the new function path_strip_last_volume().
Finally, add a comment at the top of the function that explains
what it does.
Change-Id: If4e4938801f2f81eb52f5d32b5461872995e5e83
Now offers sorting by:
- Album artist, then album name
- Album artist, then album year
- Album year
- Album name
Years are determined by the most recently
released track appearing on an album, if the
value differs between tracks.
On the M3K, instead of by going into Settings,
volume buttons can also be used for quickly
adjusting the current sorting
Change-Id: I2c50059617114fb418336c466fdd37415473ac7d
Some things in core that should probably be plugins steal the plugin buffer
for their own use, TSR plugins have no way to detect or prevent this
lock buffer reserves buffer_size bytes directly after the plugin itself
returns the unreserved bytes still available from the plugin buffer
Change-Id: I5a7849e209129b09400036a594569ef396b1b85f
I think the clipzip has the smallest screen at 96
might need to be enabled for LCD_WIDTH <=128 too
remove scrolling thread info for larger screens
Change-Id: Ic98c9fc0b53f79e90776c13429194f9c37c1d48b
apparently there are tags such as year or genre that are indexed 1 byte
apart, as much as I like the idea of this I cannot come up with a way
to reliably denote 2 16 bit entries from a single 32 bit entry without
losing data or adding bookkeeping which would likely make it pointless
Change-Id: I8a9908575700cab9506c36f5422222145557fa6b
just a little cleanup of ft file filtering code
store result of filter mask to a local var
put skin apply code in its own function
Change-Id: Ib899608f64e36346b9bde07caa5d5ac29de05af9
new operators @^, @$
begins_oneof and ends_oneof
albumartist @^ "L|The L"
Led Zeppelin, The look
albumartist @$ "girls|Boys"
spice girls, beasty boys
Change-Id: I26ce3d8155d970a55e003f74e2f9478db76204f1
the automatic scrolling is not very nice to try and read instead use
OK button to advance and long press std ok to reset to beginning
(or scroll up and down)
Change-Id: I964ccefcd3c16836cc92f52247d7b8e65c6d627b
fix bugs introduced in the switch over to using string_option
instead of if else strcmp trees,
embedded album art should work again
skin parser had an error for 'noborder' and 'nobar'
Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca
with root redirect and even relative paths eventually we need the dircache
to get files from the disk
Change-Id: Ia443f473f09dd534674d5fdb71251214ce01eed7
The implementation of write_bootdata() and get_redirect_dir() was
copied verbatim in two different places, obviously a bad thing for
maintainability. This moves them to a new file multiboot.c as they
are only used for multiboot.
Change-Id: Id0279216e4dd019f8bf612a81d3835eff010e506
I ocassionally see Playlist Invalid messages but which part is failing?
eventually it works so its probably a race
Change-Id: Ib2b09ab13ce09a55130430a2e94bc0498443b6ec
allows users to edit and view keymaps in a text editor
(parser requires one entry per line (LF or CRLF work as line endings)
allow naming of files on save
Change-Id: Id6627171eb96210b2deeef8d15bab3f8d1e0ab3f
filename buffer was too small to retrieve redirect path
if redirected to sd root remove <SD1> as it is redundant
Change-Id: I1326601f1ba4a18d6bc173798759eb762b55528c
Loads external drive into root namespace
Root Redirects can now be put into different folders
For instance placing '/_test' into SD1/rockbox_main.<playername>
will redirect to /<1>/_test/.rockbox
Debug menu>Bootdata now has root directory listed in addition to RAW Bootdata
Redirect root work from Michael Sevakis g#1556, RESTORED -> g#4256
Change-Id: Ia97cf50ff5f5b440877f9c005da6f12c53af931e
a lot of space is wasted when file indices less than 65535
entries should be more than 1 byte apart so use the LSB as a flag
when indices are > 65535 set flag to 0 and proceed as before
explicitly mark uniqbuf as 32bit
Change-Id: I54e06c152c369eb6c0322186fe2c1e9a1e6d940d
if possible search clauses are converted to filters
once a logical OR is added to the mix (CLAUSE1|CLAUSE2 & CLAUS3))
if CLAUSE1,2 are database non-numeric tags they get made into filters
but the logical OR gets carried to the next CLAUSE
Rather than trying to figure this out just keep all clauses around a logical OR
Change-Id: I03e064e7f897033c5d47d78a1d34238217cde485
use the supplied yes_no dialogs for file delete, key reset, save prompt
return to root menu automatically after loading a file
fix bug where deleting the last file in the list exited the menu
Change-Id: Ib98f6b200b9dee3e4350ad4d7ef80bbb95c77481
Allow setting and removing keyremap on the fly
It was pretty annoying trying to work out a keyremap with a restart
required to set the remap and was quite annoying when I was no
longer able to navigate to the plugin or filebrowser due to setting
the wrong remap
now you can try out a keymap and if it doesn't work a restart will
sort things out
Change-Id: I848fb3bd759f9684ac2497324a371f92b7464f7b
results of an idea I discussed in IRC
changed the way the lookup in the remap file works..
entries consist of 3 int [action, button, prebtn]
context look up table is at the beginning
action_code contains the (context | CONTEXT_REMAPPED)
button_code contains the index of the first remapped action for the matched context
[0] CORE_CONTEXT_REMAP(ctx1) offset1=(3), count=(1)
[1] CORE_CONTEXT_REMAP(ctx2, offset2=(5), count=(1)
[2] sentinel, 0, 0
[3] act0, btn, 0
[4] sentinel 0, 0
[5] act1, btn, 0
[6] sentinel, 0, 0
Note:
last entry of each group is always the sentinel [CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE]
contexts must match exactly -- re-mapped contexts run before the built in w/ fall through contexts
ie. you can't remap std_context and expect it to match std_context actions from the WPS context.
-- Done --
Code for reading core remap entries
-- Done --
import of core remap entires from disk
-- Done --
plugin to set new key mapping (the hard part)
The plugin is started and FULLY functional
you can add actions and contexts
you can change context, action, button, prebtn
delete keymap files
load keymapfiles
save user keymaps
test keymaps before applying them
loading keymaps to core still requires restart
-----------------------------------------------------------------------------------------------
Change-Id: Ib8b88c5ae91af4d540e1829de5db32669cd68203
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.
Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.
Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1