diff options
Diffstat (limited to 'eepg.c')
-rw-r--r-- | eepg.c | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -3466,6 +3466,7 @@ cPluginEEPG::cPluginEEPG (void) void cPluginEEPG::CheckCreateFile(const char* Name, const char *fileContent[]) { FILE *File; + bool isSkyTheme = fileContent == SkyItThemes || fileContent == SkyUkThemes; string FileName = string(cSetupEEPG::getInstance()->getConfDir()) + "/" + Name; File = fopen(FileName.c_str(), "r"); if (File == NULL) { @@ -3474,11 +3475,23 @@ void cPluginEEPG::CheckCreateFile(const char* Name, const char *fileContent[]) if (File == NULL) { LogE (0, prep("Error creating file '%s', %s"), FileName.c_str(), strerror (errno)); } else { - int i = 0; - while (fileContent[i] != NULL) { - fprintf (File, "%s\n", fileContent[i]); - i++; + if (!isSkyTheme) { + int i = 0; + while (fileContent[i] != NULL) { + fprintf (File, "%s\n", fileContent[i]); + i++; + } + } else { + for (int i = 0; i < 256; i++) { + if (fileContent[i]) { + fprintf (File, "0x%02x=%s\n", i, fileContent[i]); + } + else { + fprintf (File, "0x%02x=\n", i); + } + } } + LogI (0, prep("Success creating file '%s'"), FileName.c_str()); fclose (File); } |