mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-09 22:15:29 +00:00
wayland: don't define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_* macro's
They mess with #ifdef conditional in headers.
This commit is contained in:
parent
f032e8c191
commit
bb1fe302cf
|
@ -37,34 +37,29 @@ typedef struct
|
||||||
const char *libname;
|
const char *libname;
|
||||||
} waylanddynlib;
|
} waylanddynlib;
|
||||||
|
|
||||||
#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
|
||||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL NULL
|
|
||||||
#endif
|
|
||||||
#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
|
||||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR NULL
|
|
||||||
#endif
|
|
||||||
#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
|
||||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON NULL
|
|
||||||
#endif
|
|
||||||
#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
|
|
||||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR NULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static waylanddynlib waylandlibs[] = {
|
static waylanddynlib waylandlibs[] = {
|
||||||
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||||
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC },
|
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC },
|
||||||
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL },
|
#endif
|
||||||
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||||
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR },
|
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR },
|
||||||
|
#endif
|
||||||
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||||
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON },
|
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON },
|
||||||
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR }
|
#endif
|
||||||
|
#ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
|
||||||
|
{ NULL, SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR },
|
||||||
|
#endif
|
||||||
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, SDL_bool required)
|
static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, SDL_bool required)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
void *fn = NULL;
|
void *fn = NULL;
|
||||||
for (i = 0; i < SDL_TABLESIZE(waylandlibs); i++) {
|
waylanddynlib *dynlib;
|
||||||
if (waylandlibs[i].lib != NULL) {
|
for (dynlib = waylandlibs; dynlib->libname; dynlib++) {
|
||||||
fn = SDL_LoadFunction(waylandlibs[i].lib, fnname);
|
if (dynlib->lib != NULL) {
|
||||||
|
fn = SDL_LoadFunction(dynlib->lib, fnname);
|
||||||
if (fn != NULL) {
|
if (fn != NULL) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -72,10 +67,11 @@ static void *WAYLAND_GetSym(const char *fnname, int *pHasModule, SDL_bool requir
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_DYNAMIC_WAYLAND
|
#if DEBUG_DYNAMIC_WAYLAND
|
||||||
if (fn != NULL)
|
if (fn != NULL) {
|
||||||
SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, waylandlibs[i].libname, fn);
|
SDL_Log("WAYLAND: Found '%s' in %s (%p)\n", fnname, dynlib->libname, fn);
|
||||||
else
|
} else {
|
||||||
SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
|
SDL_Log("WAYLAND: Symbol '%s' NOT FOUND!\n", fnname);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fn == NULL && required) {
|
if (fn == NULL && required) {
|
||||||
|
|
Loading…
Reference in a new issue