strlcpy returns the size of the string it tried to create so we still need strlen
since we know what the sizes are of the strings just check for overflow first and use strmemccpy
fix bufsz on playlist_get_name()
Change-Id: Iaa52f869994ca94487c19b0cf2958330db4fc786
The playlist catalogue now remembers when you left
a playlist open and will return to it automatically.
Change-Id: I5b725a776b0a524139588c86e38150e5e25cb7d7
Saves and restores the selected item in your
most-recently accessed playlist, similar to Database
and File Browser.
Change-Id: I00afca41e33470cb458c4b87baccd6fd4016887a
Amachronic raised concern about open() blocking causing a static buf
to get overwritten in multiple calls its prudent to just have the caller
supply the buffer to minimize stack issues later
Change-Id: Iae27c7d063adb1a65688f920f6aa5c395fa5694a
unfortunately most of the overhead in searching for <Untagged> occurs in
reading of entries so changing searching the resulting string faster doesn't
do much good but any we don't need this strlen call since its already been
computed
Change-Id: Ia2815a6e7d75237366977632f9b0bc7999254096
current_playmode() returns a value from 'enum playmode' and we
can take advantage of the enum values to simplify the code.
Change-Id: I368ec38ba5061f6cc6d3382e536db2312b27d643
The viewport field in albumart is unnecessary, but for a different
reason than eg. the progressbar was. The skin engine draws images
by going over a global list of images shared between all viewports.
Prior to drawing a viewport, every image is marked "not displayed."
When an image display tag is encountered during rendering this mark
is set to the index of the subimage to be displayed.
The albumart is handled similarily, by setting a handle to -1 and
then updating it when the %Cd tag is encountered. The albumart is
not drawn unless the handle is set to >= 0 by the %Cd tag. So we
don't need to track or check viewports at all, because only the
viewport that contains the %Cd tag will ever draw the albumart.
Change-Id: Ibc0233d168012759325d3c16dc317de9ad3dcf6c
Yet again, no need to store the viewport because we already know
it -- and this time the render code is obviously relying on that
assumption.
Change-Id: Id5eb7cd9999fbe1efccd54bd8f0fd3c8a3011c8e
Again, we don't need to store the viewport in the progressbar
struct because it's known at render time.
Change-Id: I12514ceaace7c897194b18929364340871ef4635
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