[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/7] artist: Introduce constant for max cursor size
From: |
Helge Deller |
Subject: |
[PULL 2/7] artist: Introduce constant for max cursor size |
Date: |
Wed, 18 May 2022 18:17:53 +0200 |
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>
---
hw/display/artist.c | 10 ++++++----
1 file 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.
--
2.35.3
- [PULL 0/7] Artist cursor fix final patches, Helge Deller, 2022/05/18
- [PULL 3/7] artist: Use human-readable variable names instead of reg_xxx, Helge Deller, 2022/05/18
- [PULL 6/7] artist: Emulate screen blanking, Helge Deller, 2022/05/18
- [PULL 7/7] artist: Fix X cursor position calculation in X11, Helge Deller, 2022/05/18
- [PULL 5/7] artist: Allow to turn cursor on or off, Helge Deller, 2022/05/18
- [PULL 2/7] artist: Introduce constant for max cursor size,
Helge Deller <=
- [PULL 4/7] artist: Fix vertical X11 cursor position in HP-UX, Helge Deller, 2022/05/18
- [PULL 1/7] seabios-hppa: Update SeaBIOS-hppa to VERSION 5, Helge Deller, 2022/05/18
- Re: [PULL 0/7] Artist cursor fix final patches, Richard Henderson, 2022/05/18