mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
worker: avoid to use constant directly for capabilities size
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
3c1ab4a5fa
commit
1b2c3e4067
@ -9802,7 +9802,7 @@ static void guest_set_client_capabilities(RedWorker *worker)
|
||||
DisplayChannelClient *dcc;
|
||||
RedChannelClient *rcc;
|
||||
RingItem *link, *next;
|
||||
uint8_t caps[58] = { 0 };
|
||||
uint8_t caps[SPICE_CAPABILITIES_SIZE] = { 0 };
|
||||
int caps_available[] = {
|
||||
SPICE_DISPLAY_CAP_SIZED_STREAM,
|
||||
SPICE_DISPLAY_CAP_MONITORS_CONFIG,
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
|
||||
#include "spice-core.h"
|
||||
|
||||
#ifndef SPICE_CAPABILITIES_SIZE
|
||||
#define SPICE_CAPABILITIES_SIZE (sizeof(((QXLRom*)0)->client_capabilities))
|
||||
#endif
|
||||
|
||||
/* qxl interface */
|
||||
|
||||
#define SPICE_INTERFACE_QXL "qxl"
|
||||
@ -175,7 +179,7 @@ struct QXLInterface {
|
||||
uint32_t num_updated_rects);
|
||||
void (*set_client_capabilities)(QXLInstance *qin,
|
||||
uint8_t client_present,
|
||||
uint8_t caps[58]);
|
||||
uint8_t caps[SPICE_CAPABILITIES_SIZE]);
|
||||
/* returns 1 if the interface is supported, 0 otherwise.
|
||||
* if monitors_config is NULL nothing is done except reporting the
|
||||
* return code. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user