diff --git a/include/QF/vid.h b/include/QF/vid.h index 7f15de0e8..757bd2adf 100644 --- a/include/QF/vid.h +++ b/include/QF/vid.h @@ -73,6 +73,7 @@ void VID_Init_Cvars (void); void VID_Init (byte *palette, byte *colormap); void VID_SetPalette (byte *palette, byte *colormap); void VID_SetCaption (const char *text); +void VID_SetCursor (bool visible); void VID_ClearMemory (void); void VID_OnPaletteChange_AddListener (viddef_listener_t listener, void *data); diff --git a/include/vid_internal.h b/include/vid_internal.h index ea45d2a13..d99a57525 100644 --- a/include/vid_internal.h +++ b/include/vid_internal.h @@ -10,6 +10,7 @@ typedef struct vid_system_s { void (*set_palette) (byte *palette, byte *colormap); void (*init_cvars) (void); void (*update_fullscreen) (int fullscreen); + void (*set_cursor) (bool visible); } vid_system_t; extern vid_system_t vid_system; diff --git a/libs/video/targets/vid.c b/libs/video/targets/vid.c index 825433180..56195010c 100644 --- a/libs/video/targets/vid.c +++ b/libs/video/targets/vid.c @@ -351,6 +351,14 @@ VID_SetPalette (byte *palette, byte *colormap) vid_system.set_palette (palette, colormap); } +VISIBLE void +VID_SetCursor (bool visible) +{ + if (vid_system.set_cursor) { + vid_system.set_cursor (visible); + } +} + static void vid_fullscreen_f (void *data, const cvar_t *var) {