Commit Graph

6 Commits

Author SHA1 Message Date
William Wilgus 36d319b084 Open Plugins Ignore hash for lang Ids
no need to look up a hash when we have another searchable field
remove some un-needed checks

Change-Id: I394e5f796a164aa4bcb68a56ca02cd6a7f18d332
2021-10-23 02:45:54 -04:00
William Wilgus e1553d860d Open_Plugin add checksum on struct offsets
Adding a checksum over the struct offset will allow checking
for compatibility across machines rather than using packed structs
to ensure compability

For any file created by the user from the device  this isn't really a concern

But for files between machines, across installs (sim v device),
possibly even across compilers this at least will alert the user
rather than returning junk data

Change-Id: Id0531bbaa7013dce24dece270849f0a10ac99c20
2021-10-18 23:30:27 -04:00
William Wilgus 15ee740060 Open Plugins search by langids
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-10-16 10:18:44 -04:00
William Wilgus 29fa47d43d Open Plugin cache plugin entry when possible
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-18 02:39:30 +00:00
William Wilgus 96e1bb6556 Open Plugin cleanup
cleanup a few unneded functions

Change-Id: I7207fd1380f92bb26ab8365a4bbef6104975acbe
2020-08-18 02:07:23 +00:00
William Wilgus 3550283442 Add open_plugin to core
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-17 10:15:14 -04:00