Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RetroFE/Source/Database/GlobalOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const global_options::options_entry global_options::s_option_entries[] =

{ nullptr, nullptr, global_options::option_type::HEADER, "WINDOWS ONLY OPTIONS" },
{ OPTION_LEDBLINKYDIRECTORY, "", global_options::option_type::PATH, "Path to LEDBlinky installation" },
{ OPTION_LEDBLINKYCLOSEONEXIT, "true", global_options::option_type::BOOLEAN, "If set to false, LEDBlinky will not close with RetroFE and keep the session open" },

{ nullptr, nullptr, global_options::option_type::HEADER, "MEDIA SEARCH PATH OPTIONS" },
{ OPTION_BASEMEDIAPATH, "", global_options::option_type::PATH, "Path to media if stored outside the build" },
Expand Down
4 changes: 3 additions & 1 deletion RetroFE/Source/Database/GlobalOpts.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@

// WINDOWS ONLY OPTIONS
#define OPTION_LEDBLINKYDIRECTORY "LEDBlinkyDirectory"
#define OPTION_LEDBLINKYCLOSEONEXIT "LEDBlinkyCloseOnExit"

// MEDIA SEARCH PATH OPTIONS
#define OPTION_BASEMEDIAPATH "baseMediaPath"
Expand Down Expand Up @@ -254,7 +255,8 @@ class global_options
bool showparenthesis() { return bool_value(OPTION_SHOWPARENTHESIS); }
bool showsquarebrackets() { return bool_value(OPTION_SHOWSQUAREBRACKETS); }

const char *ledblinkydirectory() { return value(OPTION_LEDBLINKYDIRECTORY); }
const char *ledblinkydirectory() const { return value(OPTION_LEDBLINKYDIRECTORY); }
bool ledblinkycloseonexit() const { return bool_value(OPTION_LEDBLINKYCLOSEONEXIT); }

const char *basemediapath() { return value(OPTION_BASEMEDIAPATH); }
const char *baseitempath() { return value(OPTION_BASEITEMPATH); }
Expand Down
12 changes: 9 additions & 3 deletions RetroFE/Source/Execute/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,15 @@ void Launcher::LEDBlinky(int command, std::string collection, Item* collectionIt
}
std::string args = std::to_string(command);
bool wait = false;
if (command == 2)
wait = true;
if (command == 8) {
if ( command == 2 ) {
bool LEDBlinkyCloseOnExit;
config_.getProperty(OPTION_LEDBLINKYCLOSEONEXIT, LEDBlinkyCloseOnExit);
if (LEDBlinkyCloseOnExit == true) {
wait = true;
}
else wait = false;
}
if ( command == 8 ) {
std::string launcherName = collectionItem->collectionInfo->launcher;
std::string launcherFile = Utils::combinePath(Configuration::absolutePath, "collections", collectionItem->collectionInfo->name, "launchers", collectionItem->name + ".conf");
if (std::ifstream launcherStream(launcherFile.c_str()); launcherStream.good()) // Launcher file found
Expand Down
13 changes: 8 additions & 5 deletions RetroFE/Source/RetroFE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2250,11 +2250,14 @@ bool RetroFE::run()

// Wait for onExit animation to finish before quitting RetroFE
case RETROFE_QUIT:
if (currentPage_->isGraphicsIdle())
{
l.LEDBlinky(2);
l.exitScript();
running = false;
bool LEDBlinkyCloseOnExit = true;
config_.getProperty(OPTION_LEDBLINKYCLOSEONEXIT, LEDBlinkyCloseOnExit);
if ( currentPage_->isGraphicsIdle() ) {
if (LEDBlinkyCloseOnExit == true) {
l.LEDBlinky(2);
running = false;
}
else running = false;
}
break;
}
Expand Down