mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +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;
|
||||
};
|
||||
auto ret = func();
|
||||
if(ret.valid())
|
||||
ctx.result = ret.get<const char *>();
|
||||
if (ret.valid()) {
|
||||
const char *tmp = ret.get<const char *>();
|
||||
if (tmp != nullptr)
|
||||
ctx.result = tmp;
|
||||
else
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
ctx.busy = false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user