Combine the two run_external_process functions so they both have the same timeout protection

This commit is contained in:
Marc Di Luzio
2019-02-21 20:03:59 +00:00
parent e9ff2cbb10
commit 4578af47ba
6 changed files with 24 additions and 63 deletions

View File

@ -229,7 +229,7 @@ int game_mode_apply_gpu(const GameModeGPUInfo *info, bool apply)
NULL,
};
if (run_external_process(exec_args) != 0) {
if (run_external_process(exec_args, NULL) != 0) {
LOG_ERROR("Failed to call gpuclockctl, could not apply optimisations!\n");
return -1;
}
@ -262,7 +262,7 @@ int game_mode_get_gpu(GameModeGPUInfo *info)
};
char buffer[EXTERNAL_BUFFER_MAX] = { 0 };
if (run_external_process_get_output(exec_args, buffer) != 0) {
if (run_external_process(exec_args, buffer) != 0) {
LOG_ERROR("Failed to call gpuclockctl, could get values!\n");
return -1;
}