Snes9x - Make S9xSetInfoString own its string. (#1054)

This commit is contained in:
bladeoner 2023-03-15 17:28:09 +01:00 committed by GitHub
parent ce1a40b012
commit b68b198070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1760,9 +1760,12 @@ void S9xReRefresh (void)
void S9xSetInfoString (const char *string)
{
static std::string info_string;
if (Settings.InitialInfoStringTimeout > 0)
{
GFX.InfoString = string;
info_string = string;
GFX.InfoString = info_string.c_str();
GFX.InfoStringTimeout = Settings.InitialInfoStringTimeout;
S9xReRefresh();
}