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
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