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 - [patch] Initial Dosbox compatibility
Summary: [patch] Initial Dosbox compatibility
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:41 UTC by Malte Kießling
Modified: 2020-12-23 15:41 UTC (History)
0 users

See Also:


Attachments
Dosbox compatibility (1.65 KB, patch)
2020-12-23 15:41 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: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