Thanks for the information provided by Виктор(KAI4MAN)
修改前
displaydata->egl_create_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_create_pixmap_ID_mapping");
displaydata->egl_destroy_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_destroy_pixmap_ID_mapping");
if (!displaydata->egl_create_pixmap_ID_mapping || !displaydata->egl_destroy_pixmap_ID_mapping) {
MALI_VideoQuit(_this);
return SDL_SetError("mali-fbdev: Can't find mali pixmap entrypoints");
}
修改後:
/* Try eglGetProcAddress first */
displaydata->egl_create_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_create_pixmap_ID_mapping");
/* If not found, try direct dlsym from libEGL.so */
if (!displaydata->egl_create_pixmap_ID_mapping && _this->egl_data && _this->egl_data->egl_dll_handle) {
displaydata->egl_create_pixmap_ID_mapping = SDL_LoadFunction(_this->egl_data->egl_dll_handle, "egl_create_pixmap_ID_mapping");
}
displaydata->egl_destroy_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_destroy_pixmap_ID_mapping");
/* If not found, try direct dlsym from libEGL.so */
if (!displaydata->egl_destroy_pixmap_ID_mapping && _this->egl_data && _this->egl_data->egl_dll_handle) {
displaydata->egl_destroy_pixmap_ID_mapping = SDL_LoadFunction(_this->egl_data->egl_dll_handle, "egl_destroy_pixmap_ID_mapping");
}
if (!displaydata->egl_create_pixmap_ID_mapping || !displaydata->egl_destroy_pixmap_ID_mapping) {
MALI_VideoQuit(_this);
return SDL_SetError("mali-fbdev: Can't find mali pixmap entrypoints");
}