https://bugs.winehq.org/show_bug.cgi?id=54233
Bug ID: 54233 Summary: Harry Potter and the Chamber of Secrets: launcher doesn't display properly, can't launch the game Product: Wine Version: 8.0-rc2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: info@fdossena.com Distribution: ---
Created attachment 73779 --> https://bugs.winehq.org/attachment.cgi?id=73779 HP2 launcher showing the bug
The 2002 UE1 game Harry Potter and the Chamber of Secrets has a launcher from where you can configure the game, launch a new game or load a saved game.
From my testing, this happens in all versions of Wine: stable, development, staging, proton and I even tried some older stable builds.
The launcher doesn't work properly in Wine making it impossible to launch the game. I tracked down the cause to the game's attempt to center the launcher window which somehow ends up moving the contents of the window instead of the window itself.
The call to SetWindowPos seems to be done correctly and the calculations are also correct. I wasn't able to find the bug in Wine itself, but I was able to find a workaround by modifying the game exe and simply removing the offending code.
I wrote an article explaining what I did in detail, maybe someone more experienced in the inner workings of Wine can help: https://fdossena.com/?p=hp2wine/i.md
I've attached screenshots of how the launcher looks when launched normally in Wine.