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 5413 - [patch] SDL_GetWMInfo always returns -1, some applications only test against 0
Summary: [patch] SDL_GetWMInfo always returns -1, some applications only test against 0
Status: NEW
Alias: None
Product: sdl12-compat
Classification: Unclassified
Component: everything (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-23 15:06 UTC by Malte Kießling
Modified: 2020-12-23 15:06 UTC (History)
0 users

See Also:


Attachments
Let SDL_GetWMInfo return 0 "not implemented" for now. (418 bytes, patch)
2020-12-23 15:06 UTC, Malte Kießling
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Kießling 2020-12-23 15:06:31 UTC
Created attachment 4598 [details]
Let SDL_GetWMInfo return 0 "not implemented" for now.

SDL_GetWMInfo is currently returning -1. Documentation states this means the struct is not filled. 

Dosbox and some other places (http://sdl.beuc.net/sdl.wiki/SDL_GetWMInfo) however do

if (SDL_GetWMInfo(&info))

So correct behavior on the compat layer side still breaks stuff :( 
I suggest always returning 0 as long as no wrapper is constructed. As long as the return value is somewhat managed, i think this would increase compatibility. 

~mkalte