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

Summary: [patch] SDL_GetWMInfo always returns -1, some applications only test against 0
Product: sdl12-compat Reporter: Malte Kießling <mkalte>
Component: everythingAssignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   
Attachments: Let SDL_GetWMInfo return 0 "not implemented" for now.

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