mirror of https://github.com/snes9xgit/snes9x.git
Lua: fix emu.message() not to overwrite the display string by other Lua functions.
This commit is contained in:
parent
ee99d9080f
commit
3f788a3d3e
|
@ -1062,7 +1062,12 @@ DEFINE_LUA_FUNCTION(print, "...")
|
|||
DEFINE_LUA_FUNCTION(emu_message, "str")
|
||||
{
|
||||
const char* str = toCString(L);
|
||||
S9xSetInfoString(str);
|
||||
|
||||
static char msg[1024];
|
||||
strncpy(msg, str, 1024);
|
||||
msg[1024] = '\0';
|
||||
|
||||
S9xSetInfoString(msg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue