From 00cc8736f10098dedf6b856b9ad8bd0094211263 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 18 Feb 2021 11:56:08 -0500 Subject: vbe support, truecolor window manager pixbufs --- src/user/popups/info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/user/popups/info.c') diff --git a/src/user/popups/info.c b/src/user/popups/info.c index 667d440..eac155b 100644 --- a/src/user/popups/info.c +++ b/src/user/popups/info.c @@ -18,7 +18,7 @@ static const struct key_packet info_quits[] = { { .key_id = 0 } }; -void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { +void info_popup(struct popup *into, const char *msg, _pixel_t fg, _pixel_t bg) { if (!info_font) info_font = get_font(FONT); @@ -41,7 +41,7 @@ void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { const uint32_t pitch = info_font->space_width * w + 2 * PADDING; const uint32_t height = info_font->space_height * h + 2 * PADDING; - uint8_t *const pixbuf = get_block(pitch * height); + _pixel_t *const pixbuf = get_block(pitch * height * 4); for (uint32_t y = 0; y < height; ++y) for (uint32_t x = 0; x < pitch; ++x) @@ -63,13 +63,13 @@ void info_popup(struct popup *into, const char *msg, uint8_t fg, uint8_t bg) { into->handle = _new_window(pitch, height, pixbuf); } -void info_popupf_v(struct popup *into, const char *text, uint8_t fg, uint8_t bg, va_list args) { +void info_popupf_v(struct popup *into, const char *text, _pixel_t fg, _pixel_t bg, va_list args) { char *const msg = format_v(text, args); info_popup(into, msg, fg, bg); free_block(msg); } -void info_popupf(struct popup *into, const char *text, uint8_t fg, uint8_t bg, ...) { +void info_popupf(struct popup *into, const char *text, _pixel_t fg, _pixel_t bg, ...) { va_list args; va_start(args, bg); info_popupf_v(into, text, fg, bg, args); -- cgit v1.2.3