We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3532

Summary: report EGL error codes, via SDL_GetError() output
Product: SDL Reporter: David Ludwig <dll>
Component: videoAssignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: HG 2.1   
Hardware: All   
OS: All   
Attachments: patch to augment SDL_GetError() output from failed EGL calls

Description David Ludwig 2016-12-29 17:06:16 UTC
Created attachment 2657 [details]
patch to augment SDL_GetError() output from failed EGL calls

If and when SDL calls functions in EGL ( https://www.khronos.org/egl ), and if and when those calls fail, EGL-provideable details on the error may get lost, or become unnecessarily tricky to get information on (client apps would need to call eglGetError() itself, and only on supported platforms).

Attached is a patch that attempts to report EGL error codes, as well as the function which generated them.  It uses eglGetError() ( https://www.khronos.org/registry/egl/sdk/docs/man/html/eglGetError.xhtml ) to retrieve the error, and does so immediately after an EGL call fails.  The function name is listed, as EGL's function-level documentation details which functions generate what error codes, and why.

Comments, questions, or modifications regarding said patch are welcomed!
Comment 1 Sam Lantinga 2017-01-02 02:59:24 UTC
This is in, thanks!
https://hg.libsdl.org/SDL/rev/bb53965b659d