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 957 - SDL_GetWMInfo return code documented wrong in header
Summary: SDL_GetWMInfo return code documented wrong in header
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.14
Hardware: All All
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-20 18:37 UTC by Maarten ter Huurne
Modified: 2010-07-18 11:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maarten ter Huurne 2010-02-20 18:37:22 UTC
In SDL_syswm.h, the documentation for SDL_GetWMInfo() states "If it's not implemented, or the version member of the 'info' structure is invalid, it returns 0."

The doc wiki states "1 if the function is implemented and no error occured, 0 if function is unimplemented, -1 if implemented but a failure occurred."

In SDL_x11wm.c, the implementation of X11_GetWMInfo() returns -1 if the 'info' structure contains a version number larger than the version of the SDL library being called.

Since the doc wiki and the implementation agree, I am assuming the header file gets it wrong. If that is indeed the case, please fix the documentation in the header file. In the mean time, I'm going to assume that any return value greater than 0 means success.
Comment 1 Sam Lantinga 2010-07-18 10:41:41 UTC
This is fixed in revision 3f2d351d8274.  Thanks!