mirror of
https://github.com/holub/mame
synced 2025-10-06 00:54:22 +03:00
Exit on Ctrl-C in console without crashing (nw)
This commit is contained in:
parent
f3723e3a5d
commit
f9a5b51768
@ -820,8 +820,13 @@ void lua_engine::initialize()
|
|||||||
thstate["status"] = ctx.result;
|
thstate["status"] = ctx.result;
|
||||||
};
|
};
|
||||||
auto ret = func();
|
auto ret = func();
|
||||||
if(ret.valid())
|
if (ret.valid()) {
|
||||||
ctx.result = ret.get<const char *>();
|
const char *tmp = ret.get<const char *>();
|
||||||
|
if (tmp != nullptr)
|
||||||
|
ctx.result = tmp;
|
||||||
|
else
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctx.busy = false;
|
ctx.busy = false;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user