-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quick Resume Mode #15
base: knulli
Are you sure you want to change the base?
Conversation
… toggle. Added logic to manage bootgame settings in conf if mode is enabled.
es-app/src/FileData.cpp
Outdated
{ | ||
SystemConf::getInstance()->set("global.bootgame.path", getFullPath()); | ||
SystemConf::getInstance()->set("global.bootgame.cmd", quickResumeCommand); | ||
SystemConf::getInstance()->saveSystemConf(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a good idea to use batocera.conf for storing what is essentially temp data in this way. I think it would be a better approach to store the data in files. Maybe "quickresume_path" and "quickresume_cmd"?
maybe something like:
std::string quickResumePathFile = "/userdata/system/quickresume_path";
std::string quickResumeCmdFile = "/userdata/system/quickresume_cmd";
std::ofstream pathFile(quickResumePathFile, std::ios::out | std::ios::trunc);
if (pathFile.is_open())
{
pathFile << getFullPath();
pathFile.close();
}
std::ofstream cmdFile(quickResumeCmdFile, std::ios::out | std::ios::trunc);
if (cmdFile.is_open())
{
cmdFile << quickResumeCommand;
cmdFile.close();
}
What about this script for the gamestop logic?
|
These components implement a Quick Resume Mode. This implementation mostly
leverages existing Batocera features such as the Launch This Game on Startup feature. This component automates the management of
global.bootgame.cmd
andglobal.bootgame.path
settings within thebatocera.conf
configuration file.Description from the ES settings menu:
When in this mode, if you power down from ES, you will boot back in to ES. When booting a game in this mode, WIFI and Bluetooth are restored prior to game load which means RetroAchievements is supported.
The following script
quick_resume_mode.sh
needs to reside inuserdata/system/scripts
in order for this feature to work:knulli-quickmode.mp4