[Bug 36514] New: MCIWndCreate does not create a child window if parent is specified
http://bugs.winehq.org/show_bug.cgi?id=36514 Bug ID: 36514 Summary: MCIWndCreate does not create a child window if parent is specified Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvfw32 Assignee: wine-bugs(a)winehq.org Reporter: nicode(a)gmx.net WS_CHILD is commented out in the default style for MCIWnd child windows (parent window specified). But it should be included. At least one application (King's Quest: Mask of Eternity) depends on the documented API behavior. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #1 from Austin English <austinenglish(a)gmail.com> --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.51 or newer) wine? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #2 from Nico Bendlin <nicode(a)gmx.net> --- WS_CHILD is still not enforced (commented out) in MCIWndCreate. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|MCIWndCreate does not |King's Quest: Mask of |create a child window if |Eternity requires |parent is specified |MCIWndCreate to create a | |child window when parent is | |specified --- Comment #3 from Bruno Jesus <00cpxxx(a)gmail.com> --- I believe that code is like that since it was created [1] and I don't expect Dmitry to remember why that was commented. Maybe it is possible to create a test related to what the game attempts to do. Where is the documented API behavior you talk about? Can you reproduce the bug with the demo game? http://www.fileplanet.com/11159/10000/fileinfo/King%27s-Quest:-Mask-of-Etern... [1] http://source.winehq.org/git/wine.git/commitdiff/cd61ce85298b365382e783c736e... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #4 from Nico Bendlin <nico(a)nicode.net> --- Two demos have been released: - Swamp Demo (MaskDemo, English, game version 1.0.0.0) - Daventry Demo (MaskCh1, English, game version 1.0.0.1) Only the latter includes the intro video. Both demos can be downloaded from: http://www.sierrahelp.com/Misc/Demos.html#K Note that the Sierra Help Pages (SHP) setup install a modified game version 1.0.0.3 binary. You can use them if the original setup (16-bit installer) does not work. MCI in Wine does not support playing AVIs with unregistered file extensions (the videos in KQMoE are named W32*_1.dll). For Wine you have to rename the file and replace "w32opn_1.dll" with "w32opn_1.avi" in the Mask.exe. Another problem is the Indeo Video 5.0 codec that has been used for the original videos. You can download more compatible videos (Cinepak/MSADPCM) from: http://nicode.net/games/kqmoe/ The current documentation for MCIWndCreate can be found here: https://msdn.microsoft.com/en-us/library/dd757172%28v=vs.85%29.aspx It explicitly states that the default style includes WS_CHILD if a parent window is specified. I created a runtime shim library that fixes several issues in KQMoE. Adding WS_CHILD for the MCIWndCreate call did not work in Wine. I had to change the window style and make the MCI window a child of the parent after the MCIWndCreate call to make the videos work in Wine. Currently my spare time is very limited. It might take some time to retest it with my current Wine package (wine-development (1.7.52) on Debian "stretch", had no time to switch back to wine (1.8~rc1-1)). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #5 from Nico Bendlin <nico(a)nicode.net> --- If you want to test what happens if the game explicitly specifies WS_CHILD in the MCIWndCreateA call without rebuilding Wine, you can replace the following byte sequence (valid for all known Mask.exe versions): ; ; old ; ; 8B 84 24 B8 00 00 00 mov eax, [esp+000000B8h] ; 8B 4C 24 10 mov ecx, [esp+10h] ; 8B 54 24 1C mov edx, [esp+1Ch] ; 50 push eax ; szFile ; 6A 02 push 02h ; dwStyle (MCIWNDF_NOPLAYBAR) ; 51 push ecx ; hInstance ; 52 push edx ; hwndParent ; E8 __ __ __ __ call MCIWndCreateA ; 8B 84 24 B8 00 00 00 8B 4C 24 10 8B 54 24 1C 50 6A 02 51 52 E8 ; ; new ; ; FF B4 24 B8 00 00 00 push dword ptr [esp+000000B8h] ; szFile ; 68 02 00 00 40 push 40000002h ; dwStyle (WS_CHILD | MCIWNDF_NOPLAYBAR) ; FF 74 24 18 push dword ptr [esp+18h] ; hInstance ; FF 74 24 28 push dword ptr [esp+28h] ; hwndParent ; E8 __ __ __ __ call MCIWndCreateA ; FF B4 24 B8 00 00 00 68 02 00 00 40 FF 74 24 18 FF 74 24 28 E8 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #6 from Nico Bendlin <nico(a)nicode.net> --- Created attachment 53031 --> https://bugs.winehq.org/attachment.cgi?id=53031 AV without WS_CHILD Attached last 10000 line of: env WINEDEBUG=+tid,+seh,+relay,+ddraw,+mci wine Mask.exe >>MaskCh1.log 2>&1 - Original Daventry Demo (downloaded from SHP) - Wine 1.8~rc2-1 on Debian testing - "W32OPN_1.DLL" renamed to "W32OPN_1.AVI" - in Mask.exe "w32opn_1.dll" replaced with "w32opn_1.avi" - main.kq made writable - in main.kq "aviPlayed=0" changed to "aviPlayed=1" (to avoid direct video playback on start) - in Options.cs "assignGModeName Glide" changed to "assignGModeName Software" (Glide and D3D are often broken" The AV does not happen if WS_CHILD is specified in the MCIWndCreateA call (see Comment #5). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #7 from Nico Bendlin <nico(a)nicode.net> --- The proposed patch in Comment #5 breaks the compatibility with Windows (invisible MCI window): ; ; old (MCIWNDF_NOPLAYBAR) ; ; 8B 84 24 B8 00 00 00 mov eax, [esp+000000B8h] ; 8B 4C 24 10 mov ecx, [esp+10h] ; 8B 54 24 1C mov edx, [esp+1Ch] ; 50 push eax ; szFile ; 6A 02 push 02h ; dwStyle ; 51 push ecx ; hInstance ; 52 push edx ; hwndParent ; E8 __ __ __ __ call MCIWndCreateA ; 8B 84 24 B8 00 00 00 8B 4C 24 10 8B 54 24 1C 50 6A 02 51 52 E8 ; ; new (WS_VISIBLE | WS_CHILD | WS_BORDER | MCIWNDF_NOPLAYBAR) ; ; FF B4 24 B8 00 00 00 push dword ptr [esp+000000B8h] ; szFile ; 68 02 00 80 50 push 50800002h ; dwStyle ; FF 74 24 18 push dword ptr [esp+18h] ; hInstance ; FF 74 24 28 push dword ptr [esp+28h] ; hwndParent ; E8 __ __ __ __ call MCIWndCreateA ; FF B4 24 B8 00 00 00 68 02 00 80 50 FF 74 24 18 FF 74 24 28 E8 The original implementation of the API does not add WS_VISIBLE if any WS_* is specified: HWND VFWAPIV MCIWndCreate(HWND hwndParent, HINSTANCE hInstance, DWORD dwStyle, LPCTSTR szFile) { int Y = 0; int X = 0; HMENU hMenu = NULL; if (!MCIWndRegisterClass()) return (NULL); if (NULL == hInstance) hInstance = GetModuleHandle(NULL); if (!HIWORD(dwStyle)) { /* only MCIWNDF_Xxx, no WS_Xxx */ if (hwndParent) dwStyle |= WS_VISIBLE | WS_CHILD | WS_BORDER; else dwStyle |= WS_VISIBLE | WS_OVERLAPPEDWINDOW; } dwStyle |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; if ((NULL == hwndParent) && !(WS_POPUP & dwStyle)) { X = CW_USEDEFAULT; if (WS_VISIBLE & dwStyle) Y = 5; } if (WS_CHILD & dwStyle) hMenu = (HMENU)66; /* child-window identifier */ return (CreateWindowEx(0, MCIWND_WINDOW_CLASS, TEXT(""), dwStyle, X, Y, 300, 0, hwndParent, hMenu, hInstance, szFile)); } -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree(a)yahoo.fr --- Comment #8 from joaopa <jeremielapuree(a)yahoo.fr> --- Bug still there in current wine Can an administrator put the working link at the URL place http://www.sierrahelp.com/Files/Demos/KQMoEDaventryDemoSetup.zip -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.sierrahelp.com/F | |iles/Demos/KQMoEDaventryDem | |oSetup.zip -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #9 from Nico Bendlin <nico(a)nicode.net> --- For preservation purposes I provide a download of the unpacked original demos here: http://kqmoe.nicode.net/demo/ -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #10 from joaopa <jeremielapuree(a)yahoo.fr> --- Does the bug still occurs with wine-4.17? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Dan Fandrich <dan(a)coneharvesters.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dan(a)coneharvesters.com --- Comment #11 from Dan Fandrich <dan(a)coneharvesters.com> --- It still occurs with wine 4.0.3, at least. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #12 from joaopa <jeremielapuree(a)yahoo.fr> --- Can you test with vanilla wine-5.11. Wine-4.0.3 is pretty old. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Anya <animegirl(a)stronzi.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |animegirl(a)stronzi.org -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #13 from joaopa <jeremielapuree(a)yahoo.fr> --- Created attachment 67647 --> https://bugs.winehq.org/attachment.cgi?id=67647 Test for MciWndCreate At least, the attached tests show that WS_CHILD is set when parent is non-zero. But test show that WS_OVERLAPPEDWINDOWS is also set in some conditions when parent is non-zero. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 joaopa <jeremielapuree(a)yahoo.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67647|0 |1 is obsolete| | --- Comment #14 from joaopa <jeremielapuree(a)yahoo.fr> --- Created attachment 67660 --> https://bugs.winehq.org/attachment.cgi?id=67660 Test for MCIWndCreate A binch of tests for MCIWndCreate -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #15 from joaopa <jeremielapuree(a)yahoo.fr> --- Created attachment 67661 --> https://bugs.winehq.org/attachment.cgi?id=67661 Patch for bug 36514 This patch fixes the issue for this bug. All the tests are OK. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #16 from joaopa <jeremielapuree(a)yahoo.fr> --- In fact, I ca not even reach the point where the game call MciCreateWindow. The game crashes before for me. Surely previous commenters managed to workaround the first bugs to reach this point. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Nico Bendlin <nico(a)nicode.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nico(a)nicode.net --- Comment #17 from Nico Bendlin <nico(a)nicode.net> --- Created attachment 68325 --> https://bugs.winehq.org/attachment.cgi?id=68325 shell script to setup a wine prefix with the second demo -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 --- Comment #18 from Nico Bendlin <nico(a)nicode.net> --- (In reply to joaopa from comment #16)
In fact, I ca not even reach the point where the game call MciCreateWindow. The game crashes before for me. Surely previous commenters managed to workaround the first bugs to reach this point.
see https://bugs.winehq.org/attachment.cgi?id=68325 for a demo setup the game needs some tweaks beyond the bug entry - disable video autoplay on first start in main.kq and use kq8fix to redirect DLL to AVI (don't know the current state, but back in the days the MCI implementation in wine required the files to end with .avi). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Sven Arvidsson <sa(a)whiz.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sa(a)whiz.se --- Comment #19 from Sven Arvidsson <sa(a)whiz.se> --- (In reply to joaopa from comment #16)
In fact, I ca not even reach the point where the game call MciCreateWindow. The game crashes before for me. Surely previous commenters managed to workaround the first bugs to reach this point.
Hi, The patch seems to work for me with wine-6.5-275-gac65e154096 and the modified videos files, nice work! I still have other issues (with or without the patch). In Direct3D mode the game crashes when the video stops playing. In Software mode there's no issues with the video, but the game instead crashes during loading. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |focht(a)gmx.net Status|UNCONFIRMED |NEW Ever confirmed|0 |1 URL|http://www.sierrahelp.com/F |https://web.archive.org/web |iles/Demos/KQMoEDaventryDem |/20170702223731/http://sier |oSetup.zip |rahelp.com/Files/Demos/KQMo | |EDaventryDemoSetup.zip --- Comment #20 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, adding stable download link via Internet Archive. https://web.archive.org/web/20170702223731/http://sierrahelp.com/Files/Demos... $ sha1sum KQMoEDaventryDemoSetup.zip e88c2463ceb0c7f1e977cf2f65e86b9e43026e6e KQMoEDaventryDemoSetup.zip $ du -sh KQMoEDaventryDemoSetup.zip 92M KQMoEDaventryDemoSetup.zip Regards -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=36514 soredake <broaden_acid002(a)simplelogin.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|broaden_acid002(a)simplelogin | |.com | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36514 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest(a)gmail.com Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |a8fb8d484e469691e372cc1198f | |4631eb059723a --- Comment #21 from Vijay Kamuju <infyquest(a)gmail.com> --- Fix committed - https://gitlab.winehq.org/wine/wine/-/commit/a8fb8d484e469691e372cc1198f4631... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36514 Sagawa <sagawa.aki+winebugs(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs(a)gmail.c | |om --- Comment #22 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- I confirm that King's Quest: Mask of Eternity (demo) plays Cinepak/MSADPCM video without Nico's patch. In fact, child window issue has been fixed by commit 59862ef7994ecee9a2eac18d295bbece2a3a0b36 . And, the file extension issue has been fixed by commit a8fb8d484e469691e372cc1198f4631eb059723a . -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=36514 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #23 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 11.0-rc1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla