[Bug 31954] Second Sight hangs with a black screen after the intro videos

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Feb 14 17:04:05 CST 2019


https://bugs.winehq.org/show_bug.cgi?id=31954

--- Comment #35 from Paul Gofman <gofmanp at gmail.com> ---
Created attachment 63572
  --> https://bugs.winehq.org/attachment.cgi?id=63572
Proof of concept hack which lets demo run

The demo gets stuck on reading one of its files. It calls ReadFile() repeatedly
requesting all the same read infinitely.

The game uses overlapped IO for reading its data files. Those files are opened
with FILE_FLAG_OVERLAPPED, and OVERLAPPED structure is provided for FileRead
(with NULL event object). Windows seem to return ERROR_IO_PENDING consistently
for it's reads. The demo calls GetOverlappedResult() after each read (even
though Wine returns TRUE and no error from ReadFile), and proceeds further.  At
some point the game seemingly gets sick of it and starts calling ReadFile()
repeatedly with all the same parameters endlessly. Giving it FALSE /
ERROR_PENDING makes it happy.

I am attaching the hack which effectively sets ERROR_PENDING return
unconditionally for overlapped reads. With this patch applied the demo starts
and seemingly works.

-- 
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.



More information about the wine-bugs mailing list