mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-11 19:10:55 +00:00
exec: use prev ret if bad system call
This commit is contained in:
parent
bda2af47b0
commit
8f94973cd8
@ -1657,8 +1657,12 @@ void HudElements::update_exec(){
|
||||
if (!HUDElements.shell)
|
||||
HUDElements.shell = std::make_unique<Shell>();
|
||||
|
||||
for(auto& item : exec_list)
|
||||
item.ret = HUDElements.shell->exec(item.value + "\n");
|
||||
for(auto& item : exec_list){
|
||||
std::string ret = HUDElements.shell->exec(item.value + "\n");
|
||||
// use the previous ret if we get bad system call
|
||||
if (ret.find("Bad system call") == std::string::npos)
|
||||
item.ret = ret;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user