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
This commit is contained in:
William Wilgus 2021-10-13 23:45:00 -04:00
parent 6fb942d8ff
commit 15ee740060
3 changed files with 214 additions and 82 deletions

View file

@ -848,7 +848,8 @@ void root_menu(void)
}
}
bool flush = (open_plugin_get_entry(key, &open_plugin_entry) == -2);
int opret = open_plugin_get_entry(key, &open_plugin_entry);
bool flush = (opret == OPEN_PLUGIN_NEEDS_FLUSHED);
char *path = open_plugin_entry.path;
char *param = open_plugin_entry.param;
if (param[0] == '\0')