mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
parent
9173b3cdc1
commit
d3f0041043
|
@ -2363,7 +2363,8 @@ void GuiMenu::addVersionInfo()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(__RETRODECK__)
|
||||||
// Read version from /app/retrodeck/version if RETRODECK is defined
|
// Only execute this block if RETRODECK is defined
|
||||||
|
LOG(LogInfo) << "Reading /app/retrodeck/version...";
|
||||||
std::ifstream versionFile("/app/retrodeck/version");
|
std::ifstream versionFile("/app/retrodeck/version");
|
||||||
std::string retroDeckVersion;
|
std::string retroDeckVersion;
|
||||||
|
|
||||||
|
@ -2371,12 +2372,14 @@ void GuiMenu::addVersionInfo()
|
||||||
// also check that the line is not empty to ensure valid version information
|
// also check that the line is not empty to ensure valid version information
|
||||||
if (versionFile && std::getline(versionFile, retroDeckVersion) && !retroDeckVersion.empty()) {
|
if (versionFile && std::getline(versionFile, retroDeckVersion) && !retroDeckVersion.empty()) {
|
||||||
mVersion.setText(applicationName + " " + retroDeckVersion);
|
mVersion.setText(applicationName + " " + retroDeckVersion);
|
||||||
|
LOG(LogInfo) << "RetroDECK version read OK.";
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "Error: Cannot read version from file or file is empty!" << std::endl;
|
LOG(LogInfo) << "Error: Cannot read version from file or file is empty!";
|
||||||
retroDeckVersion = "UNKNOWN";
|
retroDeckVersion = "UNKNOWN";
|
||||||
mVersion.setText(applicationName + " " + retroDeckVersion);
|
mVersion.setText(applicationName + " " + retroDeckVersion);
|
||||||
}
|
}
|
||||||
#else // not RetroDECK
|
|
||||||
|
#else // If RETRODECK is NOT defined, execute this block
|
||||||
|
|
||||||
#if defined(IS_PRERELEASE)
|
#if defined(IS_PRERELEASE)
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
|
@ -2395,7 +2398,7 @@ void GuiMenu::addVersionInfo()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //RetroDECK
|
#endif // End of RetroDECK logic check
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiMenu::openThemeDownloader(GuiSettings* settings)
|
void GuiMenu::openThemeDownloader(GuiSettings* settings)
|
||||||
|
|
Loading…
Reference in a new issue