mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
ui/vc: fold text_update_xy()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230830093843.3531473-15-marcandre.lureau@redhat.com>
This commit is contained in:
parent
3be82c6a3a
commit
d7c634aadf
1 changed files with 4 additions and 9 deletions
13
ui/console.c
13
ui/console.c
|
@ -425,14 +425,6 @@ static void text_console_resize(QemuConsole *s)
|
||||||
s->cells = cells;
|
s->cells = cells;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void text_update_xy(QemuConsole *s, int x, int y)
|
|
||||||
{
|
|
||||||
s->text_x[0] = MIN(s->text_x[0], x);
|
|
||||||
s->text_x[1] = MAX(s->text_x[1], x);
|
|
||||||
s->text_y[0] = MIN(s->text_y[0], y);
|
|
||||||
s->text_y[1] = MAX(s->text_y[1], y);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void invalidate_xy(QemuConsole *s, int x, int y)
|
static void invalidate_xy(QemuConsole *s, int x, int y)
|
||||||
{
|
{
|
||||||
if (!qemu_console_is_visible(s)) {
|
if (!qemu_console_is_visible(s)) {
|
||||||
|
@ -453,7 +445,10 @@ static void update_xy(QemuConsole *s, int x, int y)
|
||||||
TextCell *c;
|
TextCell *c;
|
||||||
int y1, y2;
|
int y1, y2;
|
||||||
|
|
||||||
text_update_xy(s, x, y);
|
s->text_x[0] = MIN(s->text_x[0], x);
|
||||||
|
s->text_x[1] = MAX(s->text_x[1], x);
|
||||||
|
s->text_y[0] = MIN(s->text_y[0], y);
|
||||||
|
s->text_y[1] = MAX(s->text_y[1], y);
|
||||||
|
|
||||||
y1 = (s->y_base + y) % s->total_height;
|
y1 = (s->y_base + y) % s->total_height;
|
||||||
y2 = y1 - s->y_displayed;
|
y2 = y1 - s->y_displayed;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue