summary refs log tree commit diff stats
path: root/hw/display
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2022-05-11 11:34:15 +0200
committerHelge Deller <deller@gmx.de>2022-05-16 15:58:22 +0200
commit7e50730cb8246c33c4f79fdb130d56231ee4a67b (patch)
tree2c20263d90bf9107b925de798b55cac215b80849 /hw/display
parent041eb5bcf7394898786c50f448ea358e5067144d (diff)
downloadfocaccia-qemu-7e50730cb8246c33c4f79fdb130d56231ee4a67b.tar.gz
focaccia-qemu-7e50730cb8246c33c4f79fdb130d56231ee4a67b.zip
artist: Introduce constant for max cursor size
Add the constant NGLE_MAX_SPRITE_SIZE which defines the currently
maximum supported cursor size.

Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/artist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 39fc0c4ca5..6333ee41db 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -98,6 +98,9 @@ struct ARTISTState {
     int draw_line_pattern;
 };
 
+/* hardware allows up to 64x64, but we emulate 32x32 only. */
+#define NGLE_MAX_SPRITE_SIZE    32
+
 typedef enum {
     ARTIST_BUFFER_AP = 1,
     ARTIST_BUFFER_OVERLAY = 2,
@@ -1325,11 +1328,10 @@ static void artist_realizefn(DeviceState *dev, Error **errp)
     framebuffer_update_memory_section(&s->fbsection, &buf->mr, 0,
                                       buf->width, buf->height);
     /*
-     * no idea whether the cursor is fixed size or not, so assume 32x32 which
-     * seems sufficient for HP-UX X11.
+     * Artist cursor max size
      */
-    s->cursor_height = 32;
-    s->cursor_width = 32;
+    s->cursor_height = NGLE_MAX_SPRITE_SIZE;
+    s->cursor_width = NGLE_MAX_SPRITE_SIZE;
 
     /*
      * These two registers are not initialized by seabios's STI implementation.