Fixed building Vivante video driver
parent
99ec05e2b8
commit
0da24479da
|
@ -184,20 +184,20 @@ int VIVANTE_VideoInit(_THIS)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define LOAD_FUNC(NAME) \
|
#define LOAD_FUNC(TYPE, NAME) \
|
||||||
videodata->NAME = SDL_LoadFunction(videodata->egl_handle, #NAME); \
|
videodata->NAME = (TYPE)SDL_LoadFunction(videodata->egl_handle, #NAME); \
|
||||||
if (!videodata->NAME) \
|
if (!videodata->NAME) \
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
LOAD_FUNC(fbGetDisplay);
|
LOAD_FUNC(EGLNativeDisplayType (EGLAPIENTRY *)(void *), fbGetDisplay);
|
||||||
LOAD_FUNC(fbGetDisplayByIndex);
|
LOAD_FUNC(EGLNativeDisplayType (EGLAPIENTRY *)(int), fbGetDisplayByIndex);
|
||||||
LOAD_FUNC(fbGetDisplayGeometry);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeDisplayType, int *, int *), fbGetDisplayGeometry);
|
||||||
LOAD_FUNC(fbGetDisplayInfo);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeDisplayType, int *, int *, unsigned long *, int *, int *), fbGetDisplayInfo);
|
||||||
LOAD_FUNC(fbDestroyDisplay);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeDisplayType), fbDestroyDisplay);
|
||||||
LOAD_FUNC(fbCreateWindow);
|
LOAD_FUNC(EGLNativeWindowType (EGLAPIENTRY *)(EGLNativeDisplayType, int, int, int, int), fbCreateWindow);
|
||||||
LOAD_FUNC(fbGetWindowGeometry);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeWindowType, int *, int *, int *, int *), fbGetWindowGeometry);
|
||||||
LOAD_FUNC(fbGetWindowInfo);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeWindowType, int *, int *, int *, int *, int *, unsigned int *), fbGetWindowInfo);
|
||||||
LOAD_FUNC(fbDestroyWindow);
|
LOAD_FUNC(void (EGLAPIENTRY *)(EGLNativeWindowType), fbDestroyWindow);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (VIVANTE_SetupPlatform(_this) < 0) {
|
if (VIVANTE_SetupPlatform(_this) < 0) {
|
||||||
|
@ -359,22 +359,15 @@ void VIVANTE_HideWindow(_THIS, SDL_Window *window)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* SDL Window Manager function */
|
/* SDL Window Manager function */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
SDL_bool
|
int VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
|
||||||
VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
|
|
||||||
{
|
{
|
||||||
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
|
||||||
SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0);
|
SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0);
|
||||||
|
|
||||||
if (info->version.major == SDL_MAJOR_VERSION) {
|
info->subsystem = SDL_SYSWM_VIVANTE;
|
||||||
info->subsystem = SDL_SYSWM_VIVANTE;
|
info->info.vivante.display = displaydata->native_display;
|
||||||
info->info.vivante.display = displaydata->native_display;
|
info->info.vivante.window = data->native_window;
|
||||||
info->info.vivante.window = data->native_window;
|
return 0;
|
||||||
return SDL_TRUE;
|
|
||||||
} else {
|
|
||||||
SDL_SetError("Application not compiled with SDL %d",
|
|
||||||
SDL_MAJOR_VERSION);
|
|
||||||
return SDL_FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue