From dfd4885e2a04308f53493d99982e0c5562c92c24 Mon Sep 17 00:00:00 2001
From: icenine451 <benjamin.r.shelton@protonmail.com>
Date: Fri, 14 Jul 2023 08:57:22 -0400
Subject: [PATCH] ES-DE 2.1.0 patch content

---
 .../es-de/es-de-2.1-retrodeck-mods.patch      | 168 ++++++++++++++++++
 1 file changed, 168 insertions(+)

diff --git a/rd-submodules/es-de/es-de-2.1-retrodeck-mods.patch b/rd-submodules/es-de/es-de-2.1-retrodeck-mods.patch
index e69de29b..2a2d01e8 100644
--- a/rd-submodules/es-de/es-de-2.1-retrodeck-mods.patch
+++ b/rd-submodules/es-de/es-de-2.1-retrodeck-mods.patch
@@ -0,0 +1,168 @@
+diff -au1r emulationstation-de/es-app/src/guis/GuiMenu.cpp emulationstation-de/es-app/src/guis/GuiMenu.cpp
+--- emulationstation-de/es-app/src/guis/GuiMenu.cpp	2023-07-14 08:44:25.788696841 -0400
++++ emulationstation-de/es-app/src/guis/GuiMenu.cpp	2023-07-14 08:48:23.574196859 -0400
+@@ -10,2 +10,3 @@
+ #include "guis/GuiMenu.h"
++#include "utils/PlatformUtil.h"
+ 
+@@ -67,2 +68,4 @@
+ 
++    addEntry("RETRODECK CONFIGURATOR", mMenuColorPrimary, false, [this] { openRetroDeckConfigurator(); });
++
+     if (!Settings::getInstance()->getBool("ForceKiosk") &&
+@@ -70,3 +73,3 @@
+ #if defined(__APPLE__)
+-        addEntry("QUIT EMULATIONSTATION", mMenuColorPrimary, false, [this] { openQuitMenu(); });
++        addEntry("QUIT RETRODECK", mMenuColorPrimary, false, [this] { openQuitMenu(); });
+ #else
+@@ -75,3 +78,3 @@
+         else
+-            addEntry("QUIT EMULATIONSTATION", mMenuColorPrimary, false, [this] { openQuitMenu(); });
++            addEntry("QUIT RETRODECK", mMenuColorPrimary, false, [this] { openQuitMenu(); });
+ #endif
+@@ -1729,2 +1732,15 @@
+ 
++void GuiMenu::openRetroDeckConfigurator()
++{
++    // Launch the configurator.sh script
++    std::string command;
++    std::string startDirectory;
++    bool runInBackground;
++    command = "bash /app/tools/configurator.sh";
++    startDirectory = "/app/tools";
++    runInBackground = false;
++    int result = Utils::Platform::launchGameUnix(command, startDirectory, runInBackground);
++    // You can add any checks for the script's outcome here.
++}
++
+ void GuiMenu::openQuitMenu()
+@@ -1758,3 +1774,3 @@
+         auto quitText = std::make_shared<TextComponent>(
+-            "QUIT EMULATIONSTATION", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
++            "QUIT RETRODECK", Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
+         quitText->setSelectable(true);
+diff -au1r emulationstation-de/es-app/src/guis/GuiMenu.h emulationstation-de/es-app/src/guis/GuiMenu.h
+--- emulationstation-de/es-app/src/guis/GuiMenu.h	2023-07-14 08:44:25.788696841 -0400
++++ emulationstation-de/es-app/src/guis/GuiMenu.h	2023-07-14 08:49:05.851991859 -0400
+@@ -46,2 +46,3 @@
+     void openOtherOptions();
++    void openRetroDeckConfigurator();
+     void openQuitMenu();
+diff -au1r emulationstation-de/es-app/src/views/ViewController.cpp emulationstation-de/es-app/src/views/ViewController.cpp
+--- emulationstation-de/es-app/src/views/ViewController.cpp	2023-07-14 08:44:25.788696841 -0400
++++ emulationstation-de/es-app/src/views/ViewController.cpp	2023-07-14 08:51:37.107581872 -0400
+@@ -164,9 +164,7 @@
+ {
+-    mNoGamesErrorMessage = "NO GAME FILES WERE FOUND. EITHER PLACE YOUR GAMES IN "
+-                           "THE CURRENTLY CONFIGURED ROM DIRECTORY OR CHANGE "
+-                           "ITS PATH USING THE BUTTON BELOW. OPTIONALLY THE ROM "
+-                           "DIRECTORY STRUCTURE CAN BE GENERATED WHICH WILL "
+-                           "CREATE A TEXT FILE FOR EACH SYSTEM PROVIDING SOME "
+-                           "INFORMATION SUCH AS THE SUPPORTED FILE EXTENSIONS.\n"
+-                           "THIS IS THE CURRENTLY CONFIGURED ROM DIRECTORY:\n";
++    mNoGamesErrorMessage = "RETRODECK COULD NOT FIND ANY ROM FILES. "
++                           "PLEASE PLACE YOUR ROM FILES INTO THE APPROPRIATE "
++                           "SYSTEM SUBFOLDER IN THE CONFIGURED ROM DIRECTORY "
++                           "AND RUN RETRODECK AGAIN TO SCAN YOUR LIBRARY.\n"
++                           "THE CURRENTLY CONFIGURED ROM DIRECTORY IS:\n";
+ 
+@@ -179,90 +177,3 @@
+     mNoGamesMessageBox = new GuiMsgBox(
+-        HelpStyle(), mNoGamesErrorMessage + mRomDirectory, "CHANGE ROM DIRECTORY",
+-        [this] {
+-            std::string currentROMDirectory;
+-#if defined(_WIN64)
+-            currentROMDirectory = Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
+-#else
+-            currentROMDirectory = FileData::getROMDirectory();
+-#endif
+-            if (Settings::getInstance()->getBool("VirtualKeyboard")) {
+-                mWindow->pushGui(new GuiTextEditKeyboardPopup(
+-                    HelpStyle(), 0.0f, "ENTER ROM DIRECTORY PATH", currentROMDirectory,
+-                    [this](const std::string& newROMDirectory) {
+-                        Settings::getInstance()->setString("ROMDirectory",
+-                                                           Utils::String::trim(newROMDirectory));
+-                        Settings::getInstance()->saveFile();
+-#if defined(_WIN64)
+-                        mRomDirectory =
+-                            Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
+-#else
+-                        mRomDirectory = FileData::getROMDirectory();
+-#endif
+-                        mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
+-                        mWindow->pushGui(new GuiMsgBox(HelpStyle(),
+-                                                       "ROM DIRECTORY SETTING SAVED, RESTART\n"
+-                                                       "THE APPLICATION TO RESCAN THE SYSTEMS",
+-                                                       "OK", nullptr, "", nullptr, "", nullptr,
+-                                                       true, true));
+-                    },
+-                    false, "SAVE", "SAVE CHANGES?", "Currently configured path:",
+-                    currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH",
+-                    "CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)"));
+-            }
+-            else {
+-                mWindow->pushGui(new GuiTextEditPopup(
+-                    HelpStyle(), "ENTER ROM DIRECTORY PATH", currentROMDirectory,
+-                    [this](const std::string& newROMDirectory) {
+-                        Settings::getInstance()->setString("ROMDirectory",
+-                                                           Utils::String::trim(newROMDirectory));
+-                        Settings::getInstance()->saveFile();
+-#if defined(_WIN64)
+-                        mRomDirectory =
+-                            Utils::String::replace(FileData::getROMDirectory(), "/", "\\");
+-#else
+-                        mRomDirectory = FileData::getROMDirectory();
+-#endif
+-                        mNoGamesMessageBox->changeText(mNoGamesErrorMessage + mRomDirectory);
+-                        mWindow->pushGui(new GuiMsgBox(HelpStyle(),
+-                                                       "ROM DIRECTORY SETTING SAVED, RESTART\n"
+-                                                       "THE APPLICATION TO RESCAN THE SYSTEMS",
+-                                                       "OK", nullptr, "", nullptr, "", nullptr,
+-                                                       true));
+-                    },
+-                    false, "SAVE", "SAVE CHANGES?", "Currently configured path:",
+-                    currentROMDirectory, "LOAD CURRENTLY CONFIGURED PATH",
+-                    "CLEAR (LEAVE BLANK TO RESET TO DEFAULT PATH)"));
+-            }
+-        },
+-        "CREATE DIRECTORIES",
+-        [this] {
+-            mWindow->pushGui(new GuiMsgBox(
+-                HelpStyle(),
+-                "THIS WILL CREATE DIRECTORIES FOR ALL THE\n"
+-                "GAME SYSTEMS DEFINED IN es_systems.xml\n\n"
+-                "THIS MAY CREATE A LOT OF FOLDERS SO IT'S\n"
+-                "ADVICED TO REMOVE THE ONES YOU DON'T NEED\n\n"
+-                "PROCEED?",
+-                "YES",
+-                [this] {
+-                    if (!SystemData::createSystemDirectories()) {
+-                        mWindow->pushGui(new GuiMsgBox(HelpStyle(),
+-                                                       "THE SYSTEM DIRECTORIES WERE SUCCESSFULLY\n"
+-                                                       "GENERATED, EXIT THE APPLICATION AND PLACE\n"
+-                                                       "YOUR GAMES IN THE NEWLY CREATED FOLDERS",
+-                                                       "OK", nullptr, "", nullptr, "", nullptr,
+-                                                       true));
+-                    }
+-                    else {
+-                        mWindow->pushGui(new GuiMsgBox(HelpStyle(),
+-                                                       "ERROR CREATING THE SYSTEM DIRECTORIES,\n"
+-                                                       "PERMISSION PROBLEMS OR DISK FULL?\n\n"
+-                                                       "SEE THE LOG FILE FOR MORE DETAILS",
+-                                                       "OK", nullptr, "", nullptr, "", nullptr,
+-                                                       true));
+-                    }
+-                },
+-                "NO", nullptr, "", nullptr, true));
+-        },
+-        "QUIT",
++        HelpStyle(), mNoGamesErrorMessage + mRomDirectory, "QUIT",
+         [] {
+diff -au1r emulationstation-de/es-core/src/Window.cpp emulationstation-de/es-core/src/Window.cpp
+--- emulationstation-de/es-core/src/Window.cpp	2023-07-14 08:44:25.805371841 -0400
++++ emulationstation-de/es-core/src/Window.cpp	2023-07-14 08:52:32.335181878 -0400
+@@ -165,3 +165,3 @@
+     progressBarRect.barPosY = mSplashTextPositions.y + (progressBarRect.barHeight * 2.0f);
+-    progressBarRect.color = 0x777777FF;
++    progressBarRect.color = 0xC858E6FF;
+     mProgressBarRectangles.emplace_back(progressBarRect);