diff options
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c index f8320fc..3f3ada4 100644 --- a/server/reds.c +++ b/server/reds.c @@ -79,6 +79,7 @@ static int spice_port = -1; static int spice_secure_port = -1; static char spice_addr[256]; static int spice_family = PF_UNSPEC; +static char *default_renderer = "cairo"; static int ticketing_enabled = 1; //Ticketing is enabled by default static pthread_mutex_t *lock_cs; @@ -5436,7 +5437,9 @@ int spice_server_init(SpiceServer *s, CoreInterface *core) { ASSERT(reds == s); do_spice_init(core); - red_dispatcher_add_renderer("cairo"); + if (default_renderer) { + red_dispatcher_add_renderer(default_renderer); + } return 0; } @@ -5581,6 +5584,16 @@ int spice_server_set_mouse_absolute(SpiceServer *s, int absolute) return 0; } +int spice_server_add_renderer(SpiceServer *s, const char *name) +{ + ASSERT(reds == s); + if (!red_dispatcher_add_renderer(name)) { + return -1; + } + default_renderer = NULL; + return 0; +} + int spice_server_add_interface(SpiceServer *s, VDInterface *interface) { ASSERT(reds == s); |