| Summary: | In SDL_egl.c reports a wrong SDL_Error when the fallback path is used | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sylvain <sylvain.becker> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Fixed here: https://hg.libsdl.org/SDL/rev/a8ef3ac69e3d Thanks! |
Hi, This is a minor/typo report.. But it's annoying and leads me to wrong debugging in my case. When there is no "eglChooseConfig" in the shared object, the SDL_LoadFunction sets an "error" about "missing eglChooseConfig". And we try the "DEFAULT_EGL" path that may success afterward. But we keep the previous error which is now unrelevant ! I think we should use "SDL_ClearError()" when trying the default path. Thanks, Sylvain file "src/video/SDL_egl.c", line "186" : /* Try loading a EGL symbol, if it does not work try the default library paths */ if (SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) { // this function sets an error /// SDL_ClearError(); // <<<<<<<< We are trying again, clear the error. if (dll_handle != NULL) { SDL_UnloadObject(dll_handle); } path = SDL_getenv("SDL_VIDEO_EGL_DRIVER"); if (path == NULL) { path = DEFAULT_EGL; } dll_handle = SDL_LoadObject(path); if (dll_handle == NULL) { return SDL_SetError("Could not load EGL library"); } }