mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[console] Add a function to clear the scroll-back buffer
Needed for when the console display is cleared.
This commit is contained in:
parent
11e978b4db
commit
d6d45bf07c
2 changed files with 10 additions and 0 deletions
|
@ -98,6 +98,7 @@ con_buffer_t *Con_CreateBuffer (size_t buffer_size, int max_lines);
|
||||||
void Con_DestroyBuffer (con_buffer_t *buffer);
|
void Con_DestroyBuffer (con_buffer_t *buffer);
|
||||||
void Con_BufferAddText (con_buffer_t *buf, const char *text);
|
void Con_BufferAddText (con_buffer_t *buf, const char *text);
|
||||||
#define Con_BufferLine(b,l) ((b)->lines + ((l) + (b)->max_lines) % (b)->max_lines)
|
#define Con_BufferLine(b,l) ((b)->lines + ((l) + (b)->max_lines) % (b)->max_lines)
|
||||||
|
void Con_ClearBuffer (con_buffer_t *buffer);
|
||||||
|
|
||||||
// init/shutdown functions
|
// init/shutdown functions
|
||||||
void Con_Init (const char *plugin_name);
|
void Con_Init (const char *plugin_name);
|
||||||
|
|
|
@ -125,3 +125,12 @@ Con_BufferAddText (con_buffer_t *buf, const char *text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VISIBLE void
|
||||||
|
Con_ClearBuffer (con_buffer_t *buffer)
|
||||||
|
{
|
||||||
|
buffer->line_head = 1;
|
||||||
|
buffer->line_tail = 0;
|
||||||
|
buffer->lines[0].text = 0;
|
||||||
|
buffer->lines[0].len = 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue