Matthew Mastracci wrote:
Tony Lambregts wrote:
Matthew Mastracci wrote:
DDLOCK_NOSYSLOCK prevents DirectDraw from locking "system lock", which is a global 16-bit lock on Windows 9x systems. I don't think this is the right way to fix this.
Check out this page here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndxgen/htm...
This flag has no effect on Windows 2000 or Wine, since they don't have global Win16 locks (AFAIK).
AFAICS The locking system that you have put in place is exactly that: a "system lock". Not "global 16-bit" perhaps but it definatly is a system lock.
The locking system is actually a per-surface lock. Basically, DirectDraw under Windows requires you to lock a surface in memory before blitting to it. Wine doesn't strictly enforce this locking requirement, but some programs rely on the correct state behaviour.
I think that it really doesn't matter, we can argue symantics forever. What I am really concerned with is that these programs run.
I am fairly familiar with how this program operates. It is the program itself that is calling the locks with this flag and this is the only way I can see it can work with the system that you have put into place.
The bottom line here I have a problem with the locking system you have put into place since it breaks my favorite program. Please try the patch and see if it works for your program. If it does then we/I can work up a patch that works with your program and mine. If you are not willing to look at it am perfectly willing to submit a patch that removes your patch since it is clearly incorrect as it stands.
Please let's work together on this.
I'm not trying to be difficult, don't worry. :)
I can take a look at it, but, as I mentioned earlier, I don't currently have access to the machine to compile/test. Could you try out the change I posted earlier that changes the locking behaviour when src == dest? I haven't seen any followup mentioning whether that worked or not, but from what you've mentioned it sounds like it should solve the problem. It's a pseudo-patch, but it should be pretty obvious which part of the Blt() function to apply it to.
I tried putting in the patch as you demonstrated and I could not get it to work (get the proper behavior from SimCity 3000). That is why I came back with the patch that I did. It is possible I did not understand your intent so I would be happy to try a real patch from you.
I'll cook up a patch to implement my locking behaviour fix in Blt and BltFast, but it'll have to wait a couple of hours. I can also see if I can find a demo version of SimCity 3000 to try out.
http://www.fileshack.com/login.x?url=http%3A%2F%2Fwww.fileshack.com%2Ffile.x...
has a free "sign up" demo.(118.2 MB) It took about 15 minutes to download. It displays the same difficulty as the real version. (you are not able to move around by clicking on the playing area).
--
Tony Lambregts