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 98976fc61..39a33e494 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -696,6 +696,16 @@ 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(); diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index bbd85bfa6..7a1f70171 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2743,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