mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-13 02:08:52 +01:00
system instead of pclose
This commit is contained in:
parent
ec08845953
commit
3c72c25b9e
@ -133,10 +133,7 @@ bool Launcher::run(std::string collection, Item *collectionItem)
|
|||||||
printf("Applying keymap file cmd: \"%s\"\n", cmd.c_str());
|
printf("Applying keymap file cmd: \"%s\"\n", cmd.c_str());
|
||||||
|
|
||||||
/* Launch shell cmd */
|
/* Launch shell cmd */
|
||||||
fp = popen(cmd.c_str(), "r");
|
system(cmd.c_str());
|
||||||
if (fp != NULL) {
|
|
||||||
pclose(fp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Apply specific key mapping for selected item if found */
|
/* Apply specific key mapping for selected item if found */
|
||||||
@ -152,17 +149,11 @@ bool Launcher::run(std::string collection, Item *collectionItem)
|
|||||||
printf("Applying keymap file cmd: \"%s\"\n", cmd.c_str());
|
printf("Applying keymap file cmd: \"%s\"\n", cmd.c_str());
|
||||||
|
|
||||||
/* Launch shell cmd */
|
/* Launch shell cmd */
|
||||||
fp = popen(cmd.c_str(), "r");
|
system(cmd.c_str());
|
||||||
if (fp != NULL) {
|
|
||||||
pclose(fp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restart audio amp */
|
/* Restart audio amp */
|
||||||
fp = popen(SHELL_CMD_TURN_AMPLI_ON, "r");
|
system(SHELL_CMD_TURN_AMPLI_ON);
|
||||||
if (fp != NULL) {
|
|
||||||
pclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Execute game */
|
/* Execute game */
|
||||||
if(!execute(executablePath, args, currentDirectory))
|
if(!execute(executablePath, args, currentDirectory))
|
||||||
@ -172,16 +163,10 @@ bool Launcher::run(std::string collection, Item *collectionItem)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Stop audio amp */
|
/* Stop audio amp */
|
||||||
fp = popen(SHELL_CMD_TURN_AMPLI_OFF, "r");
|
system(SHELL_CMD_TURN_AMPLI_OFF);
|
||||||
if (fp != NULL) {
|
|
||||||
pclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Reset default key mapping */
|
/* Reset default key mapping */
|
||||||
fp = popen(SHELL_CMD_MAPPING_RESET, "r");
|
system(SHELL_CMD_MAPPING_RESET);
|
||||||
if (fp != NULL) {
|
|
||||||
pclose(fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Restore stored PID */
|
/* Restore stored PID */
|
||||||
char shellCmd[20];
|
char shellCmd[20];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user