src/video/SDL_egl.c
changeset 11839 971881e55d61
parent 11830 a01af1a724b3
child 11851 8f295e7acefd
equal deleted inserted replaced
11838:5ef6e4e70103 11839:971881e55d61
    85 #ifdef SDL_VIDEO_STATIC_ANGLE
    85 #ifdef SDL_VIDEO_STATIC_ANGLE
    86 #define LOAD_FUNC(NAME) \
    86 #define LOAD_FUNC(NAME) \
    87 _this->egl_data->NAME = (void *)NAME;
    87 _this->egl_data->NAME = (void *)NAME;
    88 #else
    88 #else
    89 #define LOAD_FUNC(NAME) \
    89 #define LOAD_FUNC(NAME) \
    90 _this->egl_data->NAME = SDL_LoadFunction(_this->egl_data->dll_handle, #NAME); \
    90 *(void**)&_this->egl_data->NAME = SDL_LoadFunction(_this->egl_data->dll_handle, #NAME); \
    91 if (!_this->egl_data->NAME) \
    91 if (!_this->egl_data->NAME) \
    92 { \
    92 { \
    93     return SDL_SetError("Could not retrieve EGL function " #NAME); \
    93     return SDL_SetError("Could not retrieve EGL function " #NAME); \
    94 }
    94 }
    95 #endif
    95 #endif
   430     if (platform) {
   430     if (platform) {
   431         if (egl_version_major == 1 && egl_version_minor == 5) {
   431         if (egl_version_major == 1 && egl_version_minor == 5) {
   432             _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplay(platform, (void *)(size_t)native_display, NULL);
   432             _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplay(platform, (void *)(size_t)native_display, NULL);
   433         } else {
   433         } else {
   434             if (SDL_EGL_HasExtension(_this, SDL_EGL_CLIENT_EXTENSION, "EGL_EXT_platform_base")) {
   434             if (SDL_EGL_HasExtension(_this, SDL_EGL_CLIENT_EXTENSION, "EGL_EXT_platform_base")) {
   435                 _this->egl_data->eglGetPlatformDisplayEXT = SDL_EGL_GetProcAddress(_this, "eglGetPlatformDisplayEXT");
   435                 *(void**)&_this->egl_data->eglGetPlatformDisplayEXT = SDL_EGL_GetProcAddress(_this, "eglGetPlatformDisplayEXT");
   436                 if (_this->egl_data->eglGetPlatformDisplayEXT) {
   436                 if (_this->egl_data->eglGetPlatformDisplayEXT) {
   437                     _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplayEXT(platform, (void *)(size_t)native_display, NULL);
   437                     _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplayEXT(platform, (void *)(size_t)native_display, NULL);
   438                 }
   438                 }
   439             }
   439             }
   440         }
   440         }