mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-23 06:35:38 +00:00
Simplified definitions
This commit is contained in:
parent
d3f0041043
commit
c20f78822c
|
@ -348,7 +348,6 @@ endif()
|
||||||
|
|
||||||
if(RETRODECK)
|
if(RETRODECK)
|
||||||
add_compile_definitions(RETRODECK)
|
add_compile_definitions(RETRODECK)
|
||||||
add_compile_definitions(__RETRODECK__)
|
|
||||||
message("-- Building for RetroDECK")
|
message("-- Building for RetroDECK")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ GuiMenu::GuiMenu()
|
||||||
if (isFullUI)
|
if (isFullUI)
|
||||||
addEntry(_("SCRAPER"), mMenuColorPrimary, true, [this] { openScraperOptions(); });
|
addEntry(_("SCRAPER"), mMenuColorPrimary, true, [this] { openScraperOptions(); });
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
if (isFullUI)
|
if (isFullUI)
|
||||||
addEntry(_("RETRODECK CLASSIC CONFIGURATOR"), mMenuColorPrimary, false, [this] { openRetroDeckClassicConfigurator(); });
|
addEntry(_("RETRODECK CLASSIC CONFIGURATOR"), mMenuColorPrimary, false, [this] { openRetroDeckClassicConfigurator(); });
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ GuiMenu::GuiMenu()
|
||||||
#elif defined(__ANDROID__)
|
#elif defined(__ANDROID__)
|
||||||
if (!AndroidVariables::sIsHomeApp)
|
if (!AndroidVariables::sIsHomeApp)
|
||||||
addEntry(_("QUIT ES-DE"), mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
addEntry(_("QUIT ES-DE"), mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
||||||
#elif defined(__RETRODECK__)
|
#elif defined(RETRODECK)
|
||||||
addEntry(_("QUIT RETRODECK"), mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
addEntry(_("QUIT RETRODECK"), mMenuColorPrimary, false, [this] { openQuitMenu(); });
|
||||||
#else
|
#else
|
||||||
if (Settings::getInstance()->getBool("ShowQuitMenu"))
|
if (Settings::getInstance()->getBool("ShowQuitMenu"))
|
||||||
|
@ -2202,7 +2202,7 @@ void GuiMenu::openUtilities()
|
||||||
mWindow->pushGui(s);
|
mWindow->pushGui(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
|
|
||||||
void GuiMenu::openESDEConfiguration() {
|
void GuiMenu::openESDEConfiguration() {
|
||||||
// RetroDECK: Create a new GuiSettings instance for the ES-DE Configurations menu
|
// RetroDECK: Create a new GuiSettings instance for the ES-DE Configurations menu
|
||||||
|
@ -2355,14 +2355,7 @@ void GuiMenu::addVersionInfo()
|
||||||
mVersion.setAutoCalcExtent(glm::ivec2 {0, 0});
|
mVersion.setAutoCalcExtent(glm::ivec2 {0, 0});
|
||||||
mVersion.setColor(mMenuColorTertiary);
|
mVersion.setColor(mMenuColorTertiary);
|
||||||
|
|
||||||
const std::string applicationName =
|
#if defined(RETRODECK)
|
||||||
#if defined(__RETRODECK__)
|
|
||||||
"RetroDECK";
|
|
||||||
#else
|
|
||||||
"ES-DE";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
|
||||||
// Only execute this block if RETRODECK is defined
|
// Only execute this block if RETRODECK is defined
|
||||||
LOG(LogInfo) << "Reading /app/retrodeck/version...";
|
LOG(LogInfo) << "Reading /app/retrodeck/version...";
|
||||||
std::ifstream versionFile("/app/retrodeck/version");
|
std::ifstream versionFile("/app/retrodeck/version");
|
||||||
|
@ -2371,12 +2364,12 @@ void GuiMenu::addVersionInfo()
|
||||||
// Attempt to open the version file and read a line into retroDeckVersion;
|
// Attempt to open the version file and read a line into retroDeckVersion;
|
||||||
// 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("RetroDECK" + " " + retroDeckVersion);
|
||||||
LOG(LogInfo) << "RetroDECK version read OK.";
|
LOG(LogInfo) << "RetroDECK version read OK.";
|
||||||
} else {
|
} else {
|
||||||
LOG(LogInfo) << "Error: Cannot read version from file or file is empty!";
|
LOG(LogInfo) << "Error: Cannot read version from file or file is empty!";
|
||||||
retroDeckVersion = "UNKNOWN";
|
retroDeckVersion = "UNKNOWN";
|
||||||
mVersion.setText(applicationName + " " + retroDeckVersion);
|
mVersion.setText("RetroDECK" + " " + retroDeckVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // If RETRODECK is NOT defined, execute this block
|
#else // If RETRODECK is NOT defined, execute this block
|
||||||
|
@ -2500,7 +2493,7 @@ std::vector<HelpPrompt> GuiMenu::getHelpPrompts()
|
||||||
return prompts;
|
return prompts;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
|
|
||||||
void GuiMenu::openRetroDeckClassicConfigurator()
|
void GuiMenu::openRetroDeckClassicConfigurator()
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@ private:
|
||||||
void openUtilities();
|
void openUtilities();
|
||||||
void openQuitMenu();
|
void openQuitMenu();
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
void openRetroDeckClassicConfigurator();
|
void openRetroDeckClassicConfigurator();
|
||||||
void openRetroDeckGodotConfigurator();
|
void openRetroDeckGodotConfigurator();
|
||||||
void openESDEConfiguration();
|
void openESDEConfiguration();
|
||||||
|
|
|
@ -636,7 +636,7 @@ void GuiThemeDownloader::parseThemesList()
|
||||||
LOG(LogWarning) << "Not running the most current application release, theme "
|
LOG(LogWarning) << "Not running the most current application release, theme "
|
||||||
"downloading is not recommended";
|
"downloading is not recommended";
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
mWindow->pushGui(new GuiMsgBox(
|
mWindow->pushGui(new GuiMsgBox(
|
||||||
getHelpStyle(),
|
getHelpStyle(),
|
||||||
_("ES-DE THEME ENGINE WAS UPDATED UPSTREAM. THESE THEMES MAY NOT BE COMPATIBLE WITH THE CURRENT RETRODECK VERSION."
|
_("ES-DE THEME ENGINE WAS UPDATED UPSTREAM. THESE THEMES MAY NOT BE COMPATIBLE WITH THE CURRENT RETRODECK VERSION."
|
||||||
|
|
|
@ -695,12 +695,14 @@ int main(int argc, char* argv[])
|
||||||
Log::open();
|
Log::open();
|
||||||
{
|
{
|
||||||
|
|
||||||
const std::string applicationName =
|
// const std::string applicationName =
|
||||||
#if defined(__RETRODECK__)
|
// #if defined(RETRODECK)
|
||||||
"RetroDECK";
|
// "RetroDECK";
|
||||||
#else
|
// #else
|
||||||
"ES-DE";
|
// "ES-DE";
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
|
const std::string applicationName = "ES-DE";
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__)
|
||||||
LOG(LogInfo) << applicationName << " " << PROGRAM_VERSION_STRING << "-"
|
LOG(LogInfo) << applicationName << " " << PROGRAM_VERSION_STRING << "-"
|
||||||
|
|
|
@ -262,7 +262,7 @@ void ViewController::invalidSystemsFileDialog()
|
||||||
|
|
||||||
void ViewController::noGamesDialog()
|
void ViewController::noGamesDialog()
|
||||||
{
|
{
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
mNoGamesErrorMessage = _("NO GAME WERE FOUND. PLEASE PLACE YOUR GAMES IN "
|
mNoGamesErrorMessage = _("NO GAME WERE FOUND. PLEASE PLACE YOUR GAMES IN "
|
||||||
"THE RETRODECK ROM DIRECTORY LOCATED IN:\n");
|
"THE RETRODECK ROM DIRECTORY LOCATED IN:\n");
|
||||||
#elif defined(__ANDROID__)
|
#elif defined(__ANDROID__)
|
||||||
|
@ -288,7 +288,7 @@ void ViewController::noGamesDialog()
|
||||||
mRomDirectory = FileData::getROMDirectory();
|
mRomDirectory = FileData::getROMDirectory();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
// Show a simple message with a "QUIT" option if RETRODECK is defined
|
// Show a simple message with a "QUIT" option if RETRODECK is defined
|
||||||
mNoGamesMessageBox = new GuiMsgBox(
|
mNoGamesMessageBox = new GuiMsgBox(
|
||||||
HelpStyle(),
|
HelpStyle(),
|
||||||
|
|
|
@ -171,7 +171,7 @@ bool Window::init()
|
||||||
progressBarRect.barHeight -= borderThickness * 2.0f;
|
progressBarRect.barHeight -= borderThickness * 2.0f;
|
||||||
progressBarRect.barPosX += borderThickness;
|
progressBarRect.barPosX += borderThickness;
|
||||||
progressBarRect.barPosY += borderThickness;
|
progressBarRect.barPosY += borderThickness;
|
||||||
#if defined(__RETRODECK__)
|
#if defined(RETRODECK)
|
||||||
progressBarRect.color = 0xC858E6FF;
|
progressBarRect.color = 0xC858E6FF;
|
||||||
#else
|
#else
|
||||||
progressBarRect.color = 0x79010FFF;
|
progressBarRect.color = 0x79010FFF;
|
||||||
|
|
Loading…
Reference in a new issue