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 5414

Summary: [patch] Initial Dosbox compatibility
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: Dosbox compatibility

Description Malte Kießling 2020-12-23 15:41:17 UTC
Created attachment 4599 [details]
Dosbox compatibility

Im throwing everything in this one as im too stupid to base patches on each other. 

This patch does three things 
  * A messy solution (set scancode to 0) for bug 5412
  * Same change as in bug 5413 letting SDL_GetHWInfo return 0 instead of -1

The thrid thing comes from something weird dosbox does: 
To check for the presence of double buffering  they have two ways: they either check via SDL_DOUBLEBUF or they check the screen surface via SDL_MUSTLOCK. 

Currently, compat sets DOUBLEBUF but not HWSURFACE, thus causing dosbox to draw into one surface (cuase doublebuf is present!) but then not upating stuff properly (cause MUSTLOCK returns 0).

So the thrid thing this patch does is set SDL_HWSURFACE next to SDL_DOUBLEBUF for VideoSurface12.

That was a little weird to figure out. 

Happy holidays and whatnot to everyone :D

~mkalte