Skip to content

Commit ee5489b

Browse files
committed
cleaned up commands in launcher.cpp.... We should launch the binary and save the son's pid in retrofe (like in gmenu2x)
1 parent 751cf64 commit ee5489b

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

RetroFE/Source/Execute/Launcher.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,11 @@ bool Launcher::run(std::string collection, Item *collectionItem)
120120
selectedItemsDirectory,
121121
collection);
122122

123-
/* Create shell cmd */
123+
/* Initialize keymap rom command */
124124
std::string cmd = SHELL_CMD_MAPPING_ROM;
125125
cmd += " '" + selectedItemsPath + "'";
126-
127-
/* Log shell cmd */
128126
Logger::write(Logger::ZONE_INFO, "Launcher", "Applying keymap rom: \"" + selectedItemsPath + "\"");
129127
printf("Applying keymap rom cmd: \"%s\"\n", cmd.c_str());
130-
131-
/* Launch shell cmd */
132128
system(cmd.c_str());
133129

134130
/* Restart audio amp */
@@ -144,14 +140,12 @@ bool Launcher::run(std::string collection, Item *collectionItem)
144140
/* Stop audio amp */
145141
system(SHELL_CMD_AUDIO_AMP_OFF);
146142

147-
/* Log shell cmd */
143+
/* Restore default keymap */
148144
Logger::write(Logger::ZONE_INFO, "Launcher", "Applying keymap default");
149145
printf("Applying keymap default cmd: \"%s\"\n", SHELL_CMD_MAPPING_DEFAULT);
150-
151-
/* Restore default key mapping */
152146
system(SHELL_CMD_MAPPING_DEFAULT);
153147

154-
/* Restore stored PID */
148+
/* Restore retrofe PID */
155149
char shellCmd[20];
156150
sprintf(shellCmd, "%s %d", SHELL_CMD_PID_RECORD, getpid());
157151
Utils::executeRawPath((const char*)shellCmd);
@@ -230,7 +224,6 @@ bool Launcher::execute(std::string executable, std::string args, std::string cur
230224
{
231225
Logger::write(Logger::ZONE_ERROR, "Launcher", "Failed to run: " + executable);
232226
}
233-
234227
else
235228
{
236229
#ifdef WIN32

0 commit comments

Comments
 (0)