mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-25 23:13:39 +00:00
[client] egl: fix building without EGL support
This commit is contained in:
parent
cf3e816603
commit
8919d2718f
@ -58,9 +58,12 @@ void app_setFullscreen(bool fs);
|
||||
bool app_getFullscreen(void);
|
||||
bool app_getProp(LG_DSProperty prop, void * ret);
|
||||
|
||||
#ifdef ENABLE_EGL
|
||||
EGLDisplay app_getEGLDisplay(void);
|
||||
EGLNativeWindowType app_getEGLNativeWindow(void);
|
||||
void app_eglSwapBuffers(EGLDisplay display, EGLSurface surface);
|
||||
#endif
|
||||
|
||||
void app_glSwapBuffers(void);
|
||||
|
||||
void app_clipboardRelease(void);
|
||||
|
@ -136,35 +136,42 @@ struct LG_DisplayServerOps
|
||||
bool (*getFullscreen)(void);
|
||||
void (*setFullscreen)(bool fs);
|
||||
|
||||
/* clipboard support */
|
||||
/* clipboard support, optional, if not supported set to NULL */
|
||||
bool (*cbInit)(void);
|
||||
void (*cbNotice)(LG_ClipboardData type);
|
||||
void (*cbRelease)(void);
|
||||
void (*cbRequest)(LG_ClipboardData type);
|
||||
};
|
||||
|
||||
#define IS_LG_DS_VALID(x) \
|
||||
((x)->probe && \
|
||||
(x)->earlyInit && \
|
||||
(x)->init && \
|
||||
(x)->startup && \
|
||||
(x)->shutdown && \
|
||||
(x)->free && \
|
||||
(x)->getProp && \
|
||||
(x)->getEGLDisplay && \
|
||||
(x)->getEGLNativeWindow && \
|
||||
(x)->eglSwapBuffers && \
|
||||
(x)->glSwapBuffers && \
|
||||
(x)->showPointer && \
|
||||
(x)->grabPointer && \
|
||||
(x)->ungrabPointer && \
|
||||
(x)->warpPointer && \
|
||||
(x)->realignPointer && \
|
||||
(x)->isValidPointerPos && \
|
||||
(x)->inhibitIdle && \
|
||||
(x)->uninhibitIdle && \
|
||||
(x)->wait && \
|
||||
(x)->setWindowSize && \
|
||||
(x)->setFullscreen && \
|
||||
(x)->getFullscreen)
|
||||
#ifdef ENABLE_EGL
|
||||
#define ASSERT_EGL_FN(x) assert(x);
|
||||
#else
|
||||
#define ASSERT_EGL_FN(x)
|
||||
#endif
|
||||
|
||||
#define ASSERT_LG_DS_VALID(x) \
|
||||
assert((x)->probe ); \
|
||||
assert((x)->earlyInit ); \
|
||||
assert((x)->init ); \
|
||||
assert((x)->startup ); \
|
||||
assert((x)->shutdown ); \
|
||||
assert((x)->free ); \
|
||||
assert((x)->getProp ); \
|
||||
ASSERT_EGL_FN((x)->getEGLDisplay ); \
|
||||
ASSERT_EGL_FN((x)->getEGLNativeWindow ); \
|
||||
ASSERT_EGL_FN((x)->eglSwapBuffers ); \
|
||||
assert((x)->glSwapBuffers ); \
|
||||
assert((x)->showPointer ); \
|
||||
assert((x)->grabPointer ); \
|
||||
assert((x)->ungrabPointer ); \
|
||||
assert((x)->warpPointer ); \
|
||||
assert((x)->realignPointer ); \
|
||||
assert((x)->isValidPointerPos ); \
|
||||
assert((x)->inhibitIdle ); \
|
||||
assert((x)->uninhibitIdle ); \
|
||||
assert((x)->wait ); \
|
||||
assert((x)->setWindowSize ); \
|
||||
assert((x)->setFullscreen ); \
|
||||
assert((x)->getFullscreen );
|
||||
|
||||
#endif
|
||||
|
@ -566,6 +566,7 @@ bool app_getProp(LG_DSProperty prop, void * ret)
|
||||
return g_state.ds->getProp(prop, ret);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_EGL
|
||||
EGLDisplay app_getEGLDisplay(void)
|
||||
{
|
||||
return g_state.ds->getEGLDisplay();
|
||||
@ -580,6 +581,7 @@ void app_eglSwapBuffers(EGLDisplay display, EGLSurface surface)
|
||||
{
|
||||
g_state.ds->eglSwapBuffers(display, surface);
|
||||
}
|
||||
#endif
|
||||
|
||||
void app_glSwapBuffers(void)
|
||||
{
|
||||
|
@ -633,7 +633,7 @@ static int lg_run(void)
|
||||
}
|
||||
|
||||
assert(g_state.ds);
|
||||
assert(IS_LG_DS_VALID(g_state.ds));
|
||||
ASSERT_LG_DS_VALID(g_state.ds);
|
||||
|
||||
// init the subsystem
|
||||
if (!g_state.ds->earlyInit())
|
||||
|
Loading…
Reference in New Issue
Block a user