Make S9xSetInfoString own its string.

This commit is contained in:
BearOso 2022-04-28 18:45:41 -05:00
parent dc3664de17
commit a32d391483
1 changed files with 4 additions and 1 deletions

View File

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