https://bugs.winehq.org/show_bug.cgi?id=51740
Bug ID: 51740 Summary: WaitForMultipleObjects doesn't signal for stdin Product: Wine Version: 6.16 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: dklwajlkwadwwq@cock.li Distribution: ---
Created attachment 70623 --> https://bugs.winehq.org/attachment.cgi?id=70623 WaitForMultipleObjects example that acts different in wine
I wanted to be signaled when stdin has something. Below code works as expected in windows 11.
In windows 11 whatever key you press signals it but in Wine it doesn't matter what key you press nothing happens.
I also opened stackoverflow question here: https://stackoverflow.com/q/69125934/15114852
https://bugs.winehq.org/show_bug.cgi?id=51740
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Why would that be a blocker?
I can reproduce the issue, but it doesn't seem consistent on Win7 either. When running from CMD, it works as you expect. But when double clicked, it instantly closes again.
Is there a reason you don't use ReadConsoleInput or something like that?
https://bugs.winehq.org/show_bug.cgi?id=51740
--- Comment #2 from dklwajlkwadwwq@cock.li --- (In reply to Fabian Maurer from comment #1)
Why would that be a blocker?
I can reproduce the issue, but it doesn't seem consistent on Win7 either. When running from CMD, it works as you expect. But when double clicked, it instantly closes again.
Is there a reason you don't use ReadConsoleInput or something like that?
When you double click to open program WaitForMultipleObjects() probably just gets some signal thats other than KeyEvent you can check out https://docs.microsoft.com/en-us/windows/console/input-record-str
I actually call ReadConsoleInput() after WaitForMultipleObjects() because WaitForMultipleObjects() makes us know ReadConsoleInput() will have atleast one event. I didn't add full code because we never pass WaitForMultipleObjects() in wine.
https://bugs.winehq.org/show_bug.cgi?id=51740
--- Comment #3 from dklwajlkwadwwq@cock.li --- This bug doesn't happen with wine's virtual desktop.