On Thu, Dec 01, 2016 at 04:04:42PM -0200, Bruno Jesus wrote:
On Thu, Dec 1, 2016 at 3:29 PM, Andrew Eikum aeikum@codeweavers.com wrote:
If the game works without compat mode, but your test doesn't, then there must be something else going on here. I wish we understood better why it works.
I don't know what else to do, you can read some more at https://bugs.winehq.org/show_bug.cgi?id=3930#c18
Huh, interesting. Either Windows has magic for this game, or it uses some other heuristic to determine whether to use the old behavior.
It would not be the first time Windows circumvents games problems. My patch is only touching Wine as configured for 9x, it brings no issues to the general user and makes Wine behave as 9x did. I cannot solve the mistery of how XP detects the game and avoids SuspendThread as my knowledge is limited and I believe it would require reverse engineering.
To be clear, I'm not rejecting your idea. Whatever this heuristic is, it would just replace the Windows version check in your patch so users wouldn't have to switch the Windows version in winecfg. We still need the separate thread implementation.
If I were to tackle this, I would reproduce the exact sequence of steps that the program takes, with identical parameters and structs, and see what happens when run on Windows. Then try to figure out which step or piece of data triggers the behavior switch.
Andrew