mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-04 06:11:17 +00:00
(GLUI) Turn box_message into char variable of fixed size
This commit is contained in:
parent
2bf27cce2f
commit
5ad098cdf9
@ -40,7 +40,7 @@
|
||||
|
||||
int line_height, glyph_width, glui_margin, glui_term_width, glui_term_height;
|
||||
GLuint glui_bg = 0;
|
||||
const char *box_message;
|
||||
char box_message[PATH_MAX];
|
||||
|
||||
static void glui_blit_line(float x, float y, const char *message, bool green)
|
||||
{
|
||||
@ -122,7 +122,7 @@ static void glui_get_message(const char *message)
|
||||
if (!driver.menu || !message || !*message)
|
||||
return;
|
||||
|
||||
box_message = message;
|
||||
strlcpy(box_message, message, sizeof(box_message));
|
||||
}
|
||||
|
||||
static void glui_render_messagebox(const char *message)
|
||||
@ -299,11 +299,11 @@ static void glui_frame(void)
|
||||
glui_render_messagebox(msg);
|
||||
}
|
||||
|
||||
if (box_message)
|
||||
if (box_message[0] != '\0')
|
||||
{
|
||||
glui_render_background();
|
||||
glui_render_messagebox(box_message);
|
||||
box_message = 0;
|
||||
box_message[0] = '\0';
|
||||
}
|
||||
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);
|
||||
|
Loading…
Reference in New Issue
Block a user