Added a constructor to GUIMESSAGE struct to ensure memory is initialized in a consistant way.

This commit is contained in:
mjbudd77 2022-01-21 18:41:09 -05:00
parent c4010846e1
commit 41df815cf6
1 changed files with 12 additions and 2 deletions

View File

@ -12,7 +12,8 @@ extern uint8 *XBackBuf;
extern uint8 *XDBuf; extern uint8 *XDBuf;
extern uint8 *XDBackBuf; extern uint8 *XDBackBuf;
extern int ClipSidesOffset; extern int ClipSidesOffset;
extern struct GUIMESSAGE
struct GUIMESSAGE
{ {
//countdown for gui messages //countdown for gui messages
int howlong; int howlong;
@ -26,8 +27,17 @@ extern struct GUIMESSAGE
//in case of multiple lines, allow one to move the message //in case of multiple lines, allow one to move the message
int linesFromBottom; int linesFromBottom;
} guiMessage; // constructor
GUIMESSAGE(void)
{
howlong = 0;
linesFromBottom = 0;
isMovieMessage = false;
errmsg[0] = 0;
}
};
extern GUIMESSAGE guiMessage;
extern GUIMESSAGE subtitleMessage; extern GUIMESSAGE subtitleMessage;
extern bool vidGuiMsgEna; extern bool vidGuiMsgEna;