diff --git a/include/helpers/config.hpp b/include/helpers/config.hpp index 0cdfec9a..5a4d0513 100644 --- a/include/helpers/config.hpp +++ b/include/helpers/config.hpp @@ -5,17 +5,18 @@ #include #include -#define CONFIG_PATH EDIZON_DIR "/config.dat" +#define CONFIG_PATH EDIZON_DIR "/seconfig.dat" namespace Config { typedef struct ConfigData { char magic[8]; bool hideSX; + char latestCommit[40]; bool option_once; bool options[3]; - char latestCommit[40]; char edizon_dir[40]; u64 lasttitle = 0; + char version[40]; } config_data_t; void readConfig(); diff --git a/source/guis/gui_about.cpp b/source/guis/gui_about.cpp index 53e4c4fc..74b5a0d6 100644 --- a/source/guis/gui_about.cpp +++ b/source/guis/gui_about.cpp @@ -179,7 +179,7 @@ static void getVersionInfoAsync(void* args) { remoteVersion = "???"; Config::readConfig(); // std::string version = Config::getConfig()->version; - if (remoteVersion.compare(0, 6, VERSION_STRING) == 0 || strcmp(remoteCommitSha.c_str(), "???") == 0) + if (remoteVersion.compare(0, 6, Config::getConfig()->version) == 0 || strcmp(remoteCommitSha.c_str(), "???") == 0) { updateAvailable = false; } diff --git a/source/helpers/config.cpp b/source/helpers/config.cpp index be76770a..38d71b40 100644 --- a/source/helpers/config.cpp +++ b/source/helpers/config.cpp @@ -10,7 +10,7 @@ if (access(CONFIG_PATH, F_OK) == 0) { fread(&configData, 1, sizeof(config_data_t), configFile); fclose(configFile); - if (strcmp(configData.magic, "EDZNCF1") != 0) { + if (strcmp(configData.magic, "EDZNCFG") != 0) { memset(&configData, 0x00, sizeof(config_data_t)); Config::writeConfig(); } @@ -21,7 +21,7 @@ if (access(CONFIG_PATH, F_OK) == 0) { void Config::writeConfig() { FILE *configFile = fopen(CONFIG_PATH, "wr"); -memcpy(configData.magic, "EDZNCF1", 8); +memcpy(configData.magic, "EDZNCFG", 8); fwrite(&configData, 1, sizeof(config_data_t), configFile); fclose(configFile);