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.