diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2017-02-06 11:39:15 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2019-01-13 13:07:58 +0000 |
commit | 15c16bf1ae947737d799fa9bfdafd1ffb9ebb49e (patch) | |
tree | a52cef0982526fb0bff4552d539194268d761f55 | |
parent | 9a55922931ba2000cf7a37507035ebdf1b9259f3 (diff) |
XXX call function dynamicallyvirgl-spice
Allow to not have a function in spice-server.
This is a temporary patch in order to make usage of different
spice-server library easier not forcing to have the new
API which is not stable
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | ui/spice-display.c | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -4198,6 +4198,8 @@ EOF fi fi +LIBS="-ldl $LIBS" + ########################################## # jemalloc probe diff --git a/ui/spice-display.c b/ui/spice-display.c index aba5a3c5f7..dab856ec11 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -26,6 +26,8 @@ #include "ui/spice-display.h" +#include <dlfcn.h> + bool spice_opengl; int qemu_spice_rect_is_empty(const QXLRect* r) @@ -913,12 +915,17 @@ static void spice_gl_switch(DisplayChangeListener *dcl, } } +void spice_qxl_gl_setup(QXLInstance *instance, void *egl_display); + static QEMUGLContext qemu_spice_gl_create_context(DisplayChangeListener *dcl, QEMUGLParams *params) { SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl); - spice_qxl_gl_setup(&ssd->qxl, qemu_egl_display); + typeof(spice_qxl_gl_setup) *ptr = (typeof(spice_qxl_gl_setup) *) dlsym(RTLD_DEFAULT, "spice_qxl_gl_setup"); + if (ptr) { + ptr(&ssd->qxl, qemu_egl_display); + } eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, qemu_egl_rn_ctx); |