mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
[Fix Red] openplugins -- import and export thru settings save / restore settings
Change-Id: Ief990b282459637a2f5974b46a6250a52b444cc0
This commit is contained in:
parent
045d148697
commit
1c3e9c181e
1 changed files with 5 additions and 1 deletions
|
|
@ -80,6 +80,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __PCTOOL__
|
#ifndef __PCTOOL__
|
||||||
|
#include "open_plugin.h"
|
||||||
struct user_settings global_settings;
|
struct user_settings global_settings;
|
||||||
struct system_status global_status;
|
struct system_status global_status;
|
||||||
static uint32_t user_settings_crc;
|
static uint32_t user_settings_crc;
|
||||||
|
|
@ -417,11 +418,13 @@ bool settings_load_config(const char* file, bool apply)
|
||||||
|
|
||||||
if (!string_to_cfg(name, value, &theme_changed))
|
if (!string_to_cfg(name, value, &theme_changed))
|
||||||
{
|
{
|
||||||
|
#ifndef __PCTOOL__
|
||||||
/* if we are here then name was not a valid setting */
|
/* if we are here then name was not a valid setting */
|
||||||
if (!strcmp(name, "openplugin"))
|
if (!strcmp(name, "openplugin"))
|
||||||
{
|
{
|
||||||
open_plugin_import(value);
|
open_plugin_import(value);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} /* while(...) */
|
} /* while(...) */
|
||||||
|
|
||||||
|
|
@ -640,12 +643,13 @@ static bool settings_write_config(const char* filename, int options)
|
||||||
|
|
||||||
fdprintf(fd,"%s: %s\r\n",setting->cfg_name,value);
|
fdprintf(fd,"%s: %s\r\n",setting->cfg_name,value);
|
||||||
} /* for(...) */
|
} /* for(...) */
|
||||||
|
#ifndef __PCTOOL__
|
||||||
if (options == SETTINGS_SAVE_ALL)
|
if (options == SETTINGS_SAVE_ALL)
|
||||||
{
|
{
|
||||||
/* add openplugin entries to the open settings file */
|
/* add openplugin entries to the open settings file */
|
||||||
open_plugin_export(fd);
|
open_plugin_export(fd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
close(fd);
|
close(fd);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue