From 0db23fa252c59290789668b8417e027a02d596db Mon Sep 17 00:00:00 2001 From: t0b10 Date: Thu, 2 Jan 2025 00:10:55 -0700 Subject: [PATCH 1/9] Add configuration setting to batocera.conf and settings menu entry to toggle. Added logic to manage bootgame settings in conf if mode is enabled. --- es-app/src/FileData.cpp | 9 +++++++++ es-app/src/guis/GuiMenu.cpp | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 98976fc61..d0009ff47 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -696,6 +696,8 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; + std::string quickResumeCommand = getlaunchCommand(false); + AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); @@ -705,6 +707,13 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) const std::string rom = Utils::FileSystem::getEscapedPath(getPath()); const std::string basename = Utils::FileSystem::getStem(getPath()); + if (!quickResumeCommand.empty() && SystemConf::getInstance()->getBool("global.quickresumemode") == true) + { + SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); + SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); + SystemConf::getInstance()->saveSystemConf(); + } + Scripting::fireEvent("game-start", rom, basename, getName()); time_t tstart = time(NULL); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index bbd85bfa6..4f2c97b48 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2743,6 +2743,12 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("SHOW SAVESTATE MANAGER"), _("Display savestate manager before launching a game."), showSaveStates); s->addSaveFunc([showSaveStates] { SystemConf::getInstance()->set("global.savestates", showSaveStates->getSelected()); }); + // QUICK RESUME MODE + auto quickResumeMode = std::make_shared(mWindow); + quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); + s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); + s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); + s->addGroup(_("DEFAULT GLOBAL SETTINGS")); // Screen ratio choice From 8be07636336776f9c63c35de586a491078e9ad37 Mon Sep 17 00:00:00 2001 From: t0b10 Date: Fri, 3 Jan 2025 21:46:49 -0700 Subject: [PATCH 2/9] Rollback changes to GuiMenu.cpp to use configuration yml. --- es-app/src/guis/GuiMenu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 4f2c97b48..451e6c084 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2743,11 +2743,11 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("SHOW SAVESTATE MANAGER"), _("Display savestate manager before launching a game."), showSaveStates); s->addSaveFunc([showSaveStates] { SystemConf::getInstance()->set("global.savestates", showSaveStates->getSelected()); }); - // QUICK RESUME MODE - auto quickResumeMode = std::make_shared(mWindow); - quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); - s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); + // // QUICK RESUME MODE + // auto quickResumeMode = std::make_shared(mWindow); + // quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); + // s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); + // s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); s->addGroup(_("DEFAULT GLOBAL SETTINGS")); From 4fa31e5d7a42b876cd0a37c6cb6dba0a00cd149c Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sat, 4 Jan 2025 02:13:01 -0700 Subject: [PATCH 3/9] Revert "Rollback changes to GuiMenu.cpp to use configuration yml." This reverts commit 8be07636336776f9c63c35de586a491078e9ad37. --- es-app/src/guis/GuiMenu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 451e6c084..4f2c97b48 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2743,11 +2743,11 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("SHOW SAVESTATE MANAGER"), _("Display savestate manager before launching a game."), showSaveStates); s->addSaveFunc([showSaveStates] { SystemConf::getInstance()->set("global.savestates", showSaveStates->getSelected()); }); - // // QUICK RESUME MODE - // auto quickResumeMode = std::make_shared(mWindow); - // quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - // s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); - // s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); + // QUICK RESUME MODE + auto quickResumeMode = std::make_shared(mWindow); + quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); + s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); + s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); s->addGroup(_("DEFAULT GLOBAL SETTINGS")); From 174f26b61ff691eeaf00b2723c1d616bc8c26dbb Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 04:52:42 -0700 Subject: [PATCH 4/9] Refactor creation of quick resume command creation. --- es-app/src/FileData.cpp | 26 ++++++++++++++++++-------- es-app/src/FileData.h | 1 + es-app/src/guis/GuiMenu.cpp | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index d0009ff47..08824ed1b 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -680,6 +680,13 @@ std::string FileData::getMessageFromExitCode(int exitCode) return _("UKNOWN ERROR") + " : " + std::to_string(exitCode); } +bool FileData::setQuickResumeCommand(std::string quickResumeCommand) +{ + SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); + SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); + return SystemConf::getInstance()->saveSystemConf(); +} + bool FileData::launchGame(Window* window, LaunchGameOptions options) { LOG(LogInfo) << "Attempting to launch game..."; @@ -696,7 +703,17 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; - std::string quickResumeCommand = getlaunchCommand(false); +#if Knulli + if (SystemConf::getInstance()->getBool("global.quickresumemode") == true) + { + std::string quickResumeCommand = getlaunchCommand(false); + if (!quickResumeCommand.empty()) + if (!setQuickResumeCommand(quickResumeCommand)) + LOG(LogWarning) << "...quick resume command was not saved in batocera.conf!"; + else + LOG(LogWarning) << "...quick resume command was empty!"; + } +#endif AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); @@ -707,13 +724,6 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) const std::string rom = Utils::FileSystem::getEscapedPath(getPath()); const std::string basename = Utils::FileSystem::getStem(getPath()); - if (!quickResumeCommand.empty() && SystemConf::getInstance()->getBool("global.quickresumemode") == true) - { - SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); - SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); - SystemConf::getInstance()->saveSystemConf(); - } - Scripting::fireEvent("game-start", rom, basename, getName()); time_t tstart = time(NULL); diff --git a/es-app/src/FileData.h b/es-app/src/FileData.h index 9ceeafc46..c40a3cfbb 100644 --- a/es-app/src/FileData.h +++ b/es-app/src/FileData.h @@ -139,6 +139,7 @@ class FileData : public IKeyboardMapContainer, public IBindable std::string getlaunchCommand(bool includeControllers = true) { LaunchGameOptions options; return getlaunchCommand(options, includeControllers); }; std::string getlaunchCommand(LaunchGameOptions& options, bool includeControllers = true); + bool setQuickResumeCommand(std::string quickResumeCommand); bool launchGame(Window* window, LaunchGameOptions options = LaunchGameOptions()); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 4f2c97b48..b4ba45946 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2746,7 +2746,7 @@ void GuiMenu::openGamesSettings() // QUICK RESUME MODE auto quickResumeMode = std::make_shared(mWindow); quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); + s->addWithDescription(_("QUICK RESUME MODE"), _("If a shutdown occurs during gameplay, next boot skips loading of ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); s->addGroup(_("DEFAULT GLOBAL SETTINGS")); From d37644702250cfc66368e47f90c28f692036f8dd Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 05:15:18 -0700 Subject: [PATCH 5/9] Minor changes. --- es-app/src/FileData.cpp | 2 -- es-app/src/guis/GuiMenu.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 08824ed1b..b71e94612 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -703,7 +703,6 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; -#if Knulli if (SystemConf::getInstance()->getBool("global.quickresumemode") == true) { std::string quickResumeCommand = getlaunchCommand(false); @@ -713,7 +712,6 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) else LOG(LogWarning) << "...quick resume command was empty!"; } -#endif AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index b4ba45946..08fead379 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2746,9 +2746,9 @@ void GuiMenu::openGamesSettings() // QUICK RESUME MODE auto quickResumeMode = std::make_shared(mWindow); quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("If a shutdown occurs during gameplay, next boot skips loading of ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); + s->addWithDescription(_("QUICK RESUME MODE"), _("If shutdown during gameplay, next boot skips loading ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); - + s->addGroup(_("DEFAULT GLOBAL SETTINGS")); // Screen ratio choice From 505917024812c9eef81525ac72e06bc616e8d0e8 Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 07:22:58 -0700 Subject: [PATCH 6/9] Revert "Minor changes." This reverts commit d37644702250cfc66368e47f90c28f692036f8dd. --- es-app/src/FileData.cpp | 2 ++ es-app/src/guis/GuiMenu.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index b71e94612..08824ed1b 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -703,6 +703,7 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; +#if Knulli if (SystemConf::getInstance()->getBool("global.quickresumemode") == true) { std::string quickResumeCommand = getlaunchCommand(false); @@ -712,6 +713,7 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) else LOG(LogWarning) << "...quick resume command was empty!"; } +#endif AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 08fead379..b4ba45946 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2746,9 +2746,9 @@ void GuiMenu::openGamesSettings() // QUICK RESUME MODE auto quickResumeMode = std::make_shared(mWindow); quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("If shutdown during gameplay, next boot skips loading ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); + s->addWithDescription(_("QUICK RESUME MODE"), _("If a shutdown occurs during gameplay, next boot skips loading of ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); - + s->addGroup(_("DEFAULT GLOBAL SETTINGS")); // Screen ratio choice From 3cb35ae6e8c52c188fd06351389fa7968429227a Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 07:23:10 -0700 Subject: [PATCH 7/9] Revert "Refactor creation of quick resume command creation." This reverts commit 174f26b61ff691eeaf00b2723c1d616bc8c26dbb. --- es-app/src/FileData.cpp | 26 ++++++++------------------ es-app/src/FileData.h | 1 - es-app/src/guis/GuiMenu.cpp | 2 +- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 08824ed1b..d0009ff47 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -680,13 +680,6 @@ std::string FileData::getMessageFromExitCode(int exitCode) return _("UKNOWN ERROR") + " : " + std::to_string(exitCode); } -bool FileData::setQuickResumeCommand(std::string quickResumeCommand) -{ - SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); - SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); - return SystemConf::getInstance()->saveSystemConf(); -} - bool FileData::launchGame(Window* window, LaunchGameOptions options) { LOG(LogInfo) << "Attempting to launch game..."; @@ -703,17 +696,7 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; -#if Knulli - if (SystemConf::getInstance()->getBool("global.quickresumemode") == true) - { - std::string quickResumeCommand = getlaunchCommand(false); - if (!quickResumeCommand.empty()) - if (!setQuickResumeCommand(quickResumeCommand)) - LOG(LogWarning) << "...quick resume command was not saved in batocera.conf!"; - else - LOG(LogWarning) << "...quick resume command was empty!"; - } -#endif + std::string quickResumeCommand = getlaunchCommand(false); AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); @@ -724,6 +707,13 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) const std::string rom = Utils::FileSystem::getEscapedPath(getPath()); const std::string basename = Utils::FileSystem::getStem(getPath()); + if (!quickResumeCommand.empty() && SystemConf::getInstance()->getBool("global.quickresumemode") == true) + { + SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); + SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); + SystemConf::getInstance()->saveSystemConf(); + } + Scripting::fireEvent("game-start", rom, basename, getName()); time_t tstart = time(NULL); diff --git a/es-app/src/FileData.h b/es-app/src/FileData.h index c40a3cfbb..9ceeafc46 100644 --- a/es-app/src/FileData.h +++ b/es-app/src/FileData.h @@ -139,7 +139,6 @@ class FileData : public IKeyboardMapContainer, public IBindable std::string getlaunchCommand(bool includeControllers = true) { LaunchGameOptions options; return getlaunchCommand(options, includeControllers); }; std::string getlaunchCommand(LaunchGameOptions& options, bool includeControllers = true); - bool setQuickResumeCommand(std::string quickResumeCommand); bool launchGame(Window* window, LaunchGameOptions options = LaunchGameOptions()); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index b4ba45946..4f2c97b48 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2746,7 +2746,7 @@ void GuiMenu::openGamesSettings() // QUICK RESUME MODE auto quickResumeMode = std::make_shared(mWindow); quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("If a shutdown occurs during gameplay, next boot skips loading of ES and proceeds directly into the game. Works with auto save/load if supported by the emulator."), quickResumeMode); + s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); s->addGroup(_("DEFAULT GLOBAL SETTINGS")); From e10e9339b016c065a908f98c3d04444d485c0b33 Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 08:19:57 -0700 Subject: [PATCH 8/9] Resolved build issue. --- .gitignore | 8 ++++++-- es-app/src/FileData.cpp | 15 ++++++++------- es-app/src/guis/GuiMenu.cpp | 14 ++++++++------ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index dc25be928..f9d08749e 100644 --- a/.gitignore +++ b/.gitignore @@ -44,9 +44,13 @@ Makefile CPackConfig.cmake CPackSourceConfig.cmake +# VS Code +/.vscode +*.code-workspace +/.vs/ + # batocera # po backup *.po~ -/.vs/ *.sqlite -.DS_Store +.DS_Store \ No newline at end of file diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index d0009ff47..39a33e494 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -696,7 +696,15 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) if (command.empty()) return false; + // KNULLI - QUICK RESUME MODE >>> std::string quickResumeCommand = getlaunchCommand(false); + if (!quickResumeCommand.empty() && SystemConf::getInstance()->getBool("global.quickresume") == true) + { + SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); + SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); + SystemConf::getInstance()->saveSystemConf(); + } + // KNULLI - QUICK RESUME MODE <<< AudioManager::getInstance()->deinit(); VolumeControl::getInstance()->deinit(); @@ -707,13 +715,6 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options) const std::string rom = Utils::FileSystem::getEscapedPath(getPath()); const std::string basename = Utils::FileSystem::getStem(getPath()); - if (!quickResumeCommand.empty() && SystemConf::getInstance()->getBool("global.quickresumemode") == true) - { - SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); - SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); - SystemConf::getInstance()->saveSystemConf(); - } - Scripting::fireEvent("game-start", rom, basename, getName()); time_t tstart = time(NULL); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 4f2c97b48..dbf4dd114 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2726,6 +2726,14 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("AUTO SAVE/LOAD"), _("Load latest savestate on game launch and savestate when exiting game."), autosave_enabled); s->addSaveFunc([autosave_enabled] { SystemConf::getInstance()->set("global.autosave", autosave_enabled->getState() ? "1" : ""); }); + // KNULLI - QUICK RESUME MODE >>> + // QUICK RESUME MODE + auto quickresume_enabled = std::make_shared(mWindow); + quickresume_enabled->setState(SystemConf::getInstance()->get("global.quickresume") == "1"); + s->addWithDescription(_("QUICK RESUME"), _("If shutdown occurs during gameplay, system will boot directly into game on next startup. Works with Auto Save/Load on supported emulators."), quickresume_enabled); + s->addSaveFunc([quickresume_enabled] { SystemConf::getInstance()->set("global.quickresume", quickresume_enabled->getState() ? "1" : ""); }); + // KNULLI - QUICK RESUME MODE <<< + // INCREMENTAL SAVESTATES auto incrementalSaveStates = std::make_shared>(mWindow, _("INCREMENTAL SAVESTATES")); incrementalSaveStates->addRange({ @@ -2743,12 +2751,6 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("SHOW SAVESTATE MANAGER"), _("Display savestate manager before launching a game."), showSaveStates); s->addSaveFunc([showSaveStates] { SystemConf::getInstance()->set("global.savestates", showSaveStates->getSelected()); }); - // QUICK RESUME MODE - auto quickResumeMode = std::make_shared(mWindow); - quickResumeMode->setState(SystemConf::getInstance()->get("global.quickresumemode") == "1"); - s->addWithDescription(_("QUICK RESUME MODE"), _("Boots directly from the last played game if shutdown during gameplay. Works with auto save/load. Reduces boot time by scanning games, laoding ES, after game exit."), quickResumeMode); - s->addSaveFunc([quickResumeMode] { SystemConf::getInstance()->set("global.quickresumemode", quickResumeMode->getState() ? "1" : ""); }); - s->addGroup(_("DEFAULT GLOBAL SETTINGS")); // Screen ratio choice From fb0a8cb15c180df76a77c982af6fe4256f002e79 Mon Sep 17 00:00:00 2001 From: t0b10 Date: Sun, 5 Jan 2025 08:53:47 -0700 Subject: [PATCH 9/9] Minor layout and messaging improvements for 150% menu font size in default theme. --- es-app/src/guis/GuiMenu.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index dbf4dd114..7a1f70171 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2726,14 +2726,6 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("AUTO SAVE/LOAD"), _("Load latest savestate on game launch and savestate when exiting game."), autosave_enabled); s->addSaveFunc([autosave_enabled] { SystemConf::getInstance()->set("global.autosave", autosave_enabled->getState() ? "1" : ""); }); - // KNULLI - QUICK RESUME MODE >>> - // QUICK RESUME MODE - auto quickresume_enabled = std::make_shared(mWindow); - quickresume_enabled->setState(SystemConf::getInstance()->get("global.quickresume") == "1"); - s->addWithDescription(_("QUICK RESUME"), _("If shutdown occurs during gameplay, system will boot directly into game on next startup. Works with Auto Save/Load on supported emulators."), quickresume_enabled); - s->addSaveFunc([quickresume_enabled] { SystemConf::getInstance()->set("global.quickresume", quickresume_enabled->getState() ? "1" : ""); }); - // KNULLI - QUICK RESUME MODE <<< - // INCREMENTAL SAVESTATES auto incrementalSaveStates = std::make_shared>(mWindow, _("INCREMENTAL SAVESTATES")); incrementalSaveStates->addRange({ @@ -2751,6 +2743,14 @@ void GuiMenu::openGamesSettings() s->addWithDescription(_("SHOW SAVESTATE MANAGER"), _("Display savestate manager before launching a game."), showSaveStates); s->addSaveFunc([showSaveStates] { SystemConf::getInstance()->set("global.savestates", showSaveStates->getSelected()); }); + // KNULLI - QUICK RESUME MODE >>> + // QUICK RESUME MODE + auto quickresume_enabled = std::make_shared(mWindow); + quickresume_enabled->setState(SystemConf::getInstance()->get("global.quickresume") == "1"); + s->addWithDescription(_("QUICK RESUME MODE"), _("If shutdown during gameplay, boots directly into game on next startup. Works with Auto Save/Load on supported emulators."), quickresume_enabled); + s->addSaveFunc([quickresume_enabled] { SystemConf::getInstance()->set("global.quickresume", quickresume_enabled->getState() ? "1" : ""); }); + // KNULLI - QUICK RESUME MODE <<< + s->addGroup(_("DEFAULT GLOBAL SETTINGS")); // Screen ratio choice