http://bugs.winehq.org/show_bug.cgi?id=29162
marzojr@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #37801|0 |1 is obsolete| |
--- Comment #7 from marzojr@yahoo.com 2011-12-05 16:21:31 CST --- Created attachment 37815 --> http://bugs.winehq.org/attachment.cgi?id=37815 Patch done with git diff
I did as you asked, then cross-compiled and tested on my XP VM; the full patch is attached. The tests for IDirectDrawSurface3, IDirectDrawSurface4 and IDirectDrawSurface7 all work on Windows; with my proposed patch above, they fail on Wine. There is clearly something strange going on in SetSurfaceDesc.
For what is worth, I also went through the Gens rerecording source (as it might yield some clues) and found the relevant code; here is a link to an extract of the relevant file, on pastebin: http://pastebin.com/enHt8JNp
As you can see, it sets up a call to SetSurfaceDesc from lines 257-297 that clearly uses more that DDSD_LPSURFACE and DDSD_PIXELFORMAT; however, it explicitly checks the return code for failure, which means that the call succeeds on Windows.
What *could* be happening is that SetSurfaceDesc fails is you *change* anything other than what DDSD_LPSURFACE and DDSD_PIXELFORMAT allow, but it works if they would result on no change. I will see if I can make a simpler test case this weekend to test this.
Which means that, for now, I would not recommend actually applying the patch(es) I attached to the Wine source, even though they fix the problem.