browse_context was missing its root causing a NULL deref
Export User Keys was looking for at least 4 entries when it only needed 3
Change-Id: If92ecccb36bd54e1b850ac2a969fe262b5d7fd14
A changed selection only caused the item
history for deeper levels to be discarded
in tagtree_enter, when you were descending,
but not in tagtree_exit when you were ascending
the menu hierarchy again.
Change-Id: Ia40fa47980a05c2569e8af04e928b06130aa1f33
After finishing a game of Xobox, background and
foreground were both the same color, making the
high score table invisible..
Change-Id: Iab4bad0e7d3f247a4b600ff9ec8e57207bc3832f
Missing from faa2cb9
- Thrust is now Right instead of Menu
- Teleport is Left instead of Play/Pause
- Pause is Play/Pause
Change-Id: Idd9758a68250bcfb2adec14589dffbe1a091511c
- Reduce need to press multiple buttons at
the same time to quit a plugin
- Have "Menu" be default way to quit plugins or
to access plugin menu
- Fall back to (Long) "Select" or Long "Menu"
in cases where Menu button isn't available
(e.g. in ImageViewer and many games)
out of scope:
boomshine, lua_scripts, Rockpaint,
Doom, Duke3D, Pacbox, Quake,
Sgt-Puzzles, Wolf3D, XWorld,
Minesweeper, Pixel Painter, Spacerocks
Change-Id: I6d4dc7174695fe4b8ee9cbaccb21bdbfe6af5c48
nets about 5k on clipzip (less on mono, more on others)
to move rockboxlogo to .initdata section
Remove show_logo completely and move to main.c
remove plugin stub
give credits plugin its own copy
credit fallback is now show_info()
Change-Id: Id9ed787e605ed29e7ab1e7a74d3821cd0f840ed4
Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.
Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
Now that all users have replaced setting IDs with direct pointers,
find_setting() and friends don't need to return an ID value.
Change-Id: I8c5c31bb68d3bca5350d43538335265a55fd5517
left the union with function(void) and function_w_param(param)
as a few areas might still need to use both (onplay.c)
there might be a few I missed yet..
Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
just a few updates to open_plugin save a bit of space by granting access through a getter function
Change-Id: I2c0eaa1ade867510798b213006064ee1c00aa016
table settings have a list of valid values when
they do not have F_ALLOW_ARBITRARY_VALS flag
they were not being treated as such
Change-Id: Ib02643a65ee4fc2abb1be8563a1849076de2f708
1) the plugin return value isn't necessarily respected.
2) the screen will be updated regardless, before
the WPS is displayed, which means the skin may
appear in an "incorrect" state for a moment.
It is therefore better to simplify this to a single
condition.
Change-Id: I723e6fe4862172075b9a4814080f612c2b2fb490
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed
Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
chris_s noted:
When you set the WPS hotkey as a QuickScreen item and shuffle through the options,
it eventually gets to the "Open Plugin" option and will show the File Browser,
clashing with the Viewports of the QuickScreen
Change-Id: I3addbbbac5842f89c000c155484d7cb934dc500e
Lang_id keys take LANG_LAST_INDEX_IN_ARRAY for the checksum
spinning disks did not have the code to do so
Change-Id: I617e1a5462d8d6c4830a9b59171bdd7167d5e7a1
tree_get_filetype_voiceclip is called after init it shouldn't be marked as INIT_ATTR
add _init to the functions & data that are used at init only to be a bit more clear
Change-Id: I8eb1914560b782c2c0fdd7649e761f94e382d5cb
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
My impression is that the waiting time for plugins
is only ever significant if a disk needs to spin up.
In other cases, the experience seems nicer
without a 'Loading' splash, especially for
often-used plugins, such as 'Properties',
when it is launched from the Database or
from the File Browser.
Change-Id: I018ccb13466fa618ef089b6dc7714db38cffd9b6
ToggleMode is remapped to BUTTON_SELECT
Reset is remapped to Long BUTTON_HOME or Long BUTTON_SELECT (avoids accidental reset by pressing BUTTON_SELECT)
Change-Id: I6fc4050c66db2d7db7ec899f9c83b70754fef9df
Since synclists are now re-initialized after leaving
Settings menus where the callback was used, it
shouldn't be needed anymore.
gui_synclist_init_display_settings can also be made
local to list.c now.
Change-Id: I674e4da49153440b48298fed7c4d98b421b7beaa
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
Similar to 59f3f43d. It makes it behave consistently with tree/playlists other menus. So it's possible to exit option select using Back button on Clip Zip or Power button on Rocker
Change-Id: I93fe71ba2222ae16d59f3ba4cfbbedad3fb2568b
the underlying global buffer fo bookmark is overwritten by the read function so
instead make a hash of the playlist and track names
might needa better hash but hopefully CRC32 is sufficient
Change-Id: Ie25dbb62e664b804e4f858d9e0cc248fdc8c9895
90bc769 strips spaces from the settings value, but it
goes to the first space rather than just stripping off
the last one. Break out of the loop when we find the
first non-space character.
Also change 0 to '\0' for readability.
Change-Id: I915b82a6d1603740998a67c575d08005456ffbd8
1) Tree_lists was only initialized when booting the player.
In cases where a skin used custom UI viewports of
different sizes, when switching between screens, such as
between root menu, QuickScreen, and tree browser, this
caused list titles to appear with a significant delay,
unless a GUI_EVENT_ACTIONUPDATE was sent.
Tree_lists is now initialized when entering dirbrowse
or when restoring/reloading the list.
This eliminates multiple redundant UI refreshes when
entering the tree browser, due to gui_synclist_draw not
being called twice anymore and by being able to omit
GUI_EVENT_ACTIONUPDATE.
Separate calls to gui_synclist_init_display_settings
have become unnecessary since it is already called
by gui_synclist_init.
2) The synclist is also re-initialized when returning
from the QuickScreen in the Playlist Viewer or
regular menus, or when returning from Settings
menus
Change-Id: I2884249eda55f782e97abad9dc19b3d9d1267fc9
Have settings_parseline() strip trailing whitespace from
the setting value.
Fixes a regression introduced by 5b1dd64f5, which caused
filename settings to be parsed incorrectly when there is
trailing whitespace in the .cfg file.
Change-Id: I6c54428f6467ea2d169d2a7449705b40627e1a40
mutexes are in just trying to refactor the rest and make it a smaller
and more robust system
--Done
Change-Id: If64807c3e0ee1966f7593795f26f1f538caf831b
Accept a pointer to struct settings_list instead of an index in the
settings array. Refactor the skin engine's touchregion_setup_setting()
to avoid the use of indices.
Change-Id: I784a5e49205da6874b8b419dd5413f722ad45b67
- Fix placement of parentheses from commit 780990
- Return cancel when play_bookmark fails or user declines
to erase dynamic playlist after warning
- Go back to Playlist Catalogue when user cancels out of
screen
Change-Id: Ibe8c315bdf8c6c9e696f68541b5d4d97dc0e778a
global_settings is not defined when building the database tool.
Add a path buffer in tc_stat to fix this. This also avoids race
conditions that may occur if changing the path setting at runtime.
Change-Id: Ib2ca92c2e34929c79b19ef145fd7ccdcd62c8d04
TagNav.lua adds Reload to the Custom View menu of tagnav to allow users to make new search queries on the fly
previously you had to reboot the device to do this
I was getting a data abort prior to calling tagnav_init now but it worked fine if I copy pasted
the contents of the init function
I'm not sure how this fixed it but making a static init function makes it work as intended
is it a race some weird thing with the compiler??
Ideas??
Change-Id: I7fd6c50f929d3ac2d9ecec5336942288e9213ad5
Add a new setting,
database path: /path/to/folder
to change where the database files are stored, which allows it to
be shared by multiple builds when using multiboot. This avoids the
need to maintain a separate copy of the database for each build.
This setting can only be set from the config file; it has no menu
option yet (due to lack of a GUI to pick the directory).
Change-Id: Ide7b3ccdd84abb62b52f900421bd3d101773e093
Provide a function to remove the statefile so that external
users of this define can call that instead.
Change-Id: Id3e1e0564b25fe28bbc68c2e9365d8bf51e6e4f8
This has been defined to 1 since forever, so the last remaining
check presumably isn't catching anything.
Change-Id: I0b60f831a6e5e8fc45788e7581fccb0cb62bce73
Most of the defines in the header file are internal to the tagcache
and therefore should not be exposed in the header, to make it clear
that outside code does not depend on the values.
Change-Id: I83b0c83c61c755231e03719a6845a555f983194a
this needs tested by the heavy playlist users
with the addition of initialize_catalog_buf there shouldn't be any stack overflow concerns
since we are no longer creating another max_path sized buffer when one is already available
this also simplifies the code a bit
rather than carrying around the playlist directory just generate it on the fly
copies the directory to the supplied buffer
add catbroswe_status to keep track of what browse context(s) are currently in use
Change-Id: I145ec501f601c84bb52f2241ed28c6aefab6897b
get_filename() changes the seek pos with out restoring it
seek back to the beginning or after the BOM if utf8
--
the other option is to open our own file descriptor this will
remove the need for the mutex but it would no longer block get_filename
from getting potential stale / bad data
Change-Id: I0d2b8a1a297c7aaf453b3bc558b2b5b53dbe591b
All the F_PADTITLE settings use a lang string so it's safe to
assume the title (which is usually from the setting's lang_id)
is ok. Not like it's very useful or safe to show the cfg_vals,
anyway...
Change-Id: I0bf710e1b2a5a7bcdfe9e4370f48a2f25e8dddf0
The hotkey settings come from a fixed enum, arbitrary values are
not supported. It's not possible to use choice settings for them
because some enum values are only used in the WPS, and some are
only used in the tree.
Change-Id: I4647a8c02d960234323a7f2bbf31fee9f8c5b91a
This atoi() was added long ago in commit d490f441, and it looks
like it's intended to allow arbitrary values in table settings.
These table settings have some symbolic values (eg. off, on) but
are otherwise int-valued.
As far as I can see the only settings that can take this branch
are all table settings with F_ALLOW_ARBITRARY_VALS. It doesn't
make a lot of sense to accept random integers without that flag,
so make the atoi() conversion dependent on it.
Change-Id: I7bb1bc4997601b73ad8dcbf2f3ddf434d16adf23
Use find_setting_by_cfgname() instead of doing it manually.
Reduce the excessive level of indentation.
Change-Id: I410fd7e0c26d065bc479dad3b6facfb5368cd091
The old inline implementation was buggy -- it didn't check the
suffix was actually at the end of the string before stripping
it, and didn't check for truncation. This version also avoids
using an extra buffer.
Change-Id: I33abfefc508675d3079cc64a9ad2b11d646baa0d
I'm pretty sure this is a very old bug I traced it down to the
current_playlist getting changed out from under add_indices_to_playlist
causing myriad of issues from buffer full to invalid control file to shifting indices
this only appears to happen with the dircache on
I still get an incorrect resume state with the wrong song very rarely -- turns out get_filename seeks the file FIXED
Some debugging left in for now till we can verify there are no other instances
Change-Id: I289a775462eddfe93da4a326dc9e38605af06816
fix a bug where when 'most recent bookmarks'
was enabled the next bookmark file written
would get the info from the last 'most recent'
bookmark instead of the current bookmark
also removed the global resume_info struct in favor of local variables
added verification of the resumed track
Change-Id: I10176a2e4a18da6d5c4bb5fc0ed5d7e81d803ed5
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
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