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 3513 - SDL_GL_SwapWindow does not return error status
Summary: SDL_GL_SwapWindow does not return error status
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86 Other
: P2 trivial
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 2936 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-09 06:21 UTC by Intellectual Kitty
Modified: 2017-08-11 20:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Intellectual Kitty 2016-12-09 06:21:33 UTC
SDL_GL_SwapWindow may have errors but does not return error status.  Based on a survey of the code, it is possible to work around this by (1) checking the window's flags to see if it supports OpenGL and (2) checking that the window is current; this is actually what SDL_GL_SwapWindow does internally.  However, this isn't consistent with the SDL standard of returning 0 on success and -1 on failure, and it makes error checking a little more difficult.
Comment 1 Sam Lantinga 2016-12-09 09:48:09 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/23a825f341e6
Comment 2 Sam Lantinga 2016-12-11 20:09:52 UTC
Actually, this changes the ABI, so I'm backing out this change for now.
Comment 3 Sam Lantinga 2016-12-11 20:11:39 UTC
*** Bug 2936 has been marked as a duplicate of this bug. ***