Stefan Dösinger <stefandoesinger(a)gmail.com> writes:
Am 2013-10-03 21:45, schrieb Henri Verbeet:
On 3 October 2013 21:16, Lasse Rasinen <lrasinen(a)iki.fi> wrote:
According to debugging output, Artemis Spaceship Bridge Simulator 2.0 calls LockRect twice on the same texture (for whatever reason) and crashes.
http://bugs.winehq.org/show_bug.cgi?id=34271
This change prevents the locked_rect being overwritten with garbage in that case, and the game no longer crashes.
I think this patch makes sense, but could you please add a test case as well? Ideally we'd also have similar tests for other resources (i.e., textures, volumes, vertex buffers, index buffers) and D3D versions (ddraw, d3d8), but that's not a strict requirement. I'd expect that the correct behavior is to set pBits to NULL. test_volume_locking() demonstrates this for volumes.
That appears to work too, thanks. I'll have a look at the existing tests; let's see what I come up with. -- Lasse Rasinen lrasinen(a)iki.fi