I'm alittle confused, are you suggesting that if SetScissorRect receives a null value that if should default to the window size? or do you mean that perhaps GetScissorRect should call SetScissorRect and return a correct value instead of null?
If I understand you correctly it sounds like another problem and I think that checking should still be done on SetScissorRect as currently there is no checking being done where as the documentation states that D3DERR_INVALIDCALL is returned if SetScissorRect gets an invalid or null rectangle.
I'm currently rewriting the tests and patch so I'll let you know when I am done.
PS: I just looked at wine's implementation of GetScissorRect and it looks wrong as well. It should be returning D3DERR_INVALIDCALL if there is no value and perhaps maybe if scissor test hasn't been enabled.
On Sat, Aug 23, 2008 at 1:46 AM, Rico Schüller kgbricola@web.de wrote:
Andrew Fenn schrieb:
I made a new patch this time including a test.
I put in some extra checking in SetScissorRect making sure that if rect was null or it was an invalid rectangle that it was returned as invalid as it should be.
I'm not able to do a test on windows so if anyone does one please let me know if there are any problems. Also please tell me if you spot any problems with this patch.
Thanks, Andrew
- RECT rect = {0, 0, 0, 0};
- hr = IDirect3DDevice9_SetScissorRect(device, &rect);
- ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x\n", hr);
Sorry that I led you in the wrong direction but these tests didn't pass on windows! Also please read the comment to the bug, where I attached my patch. My suggestion which I made there isn't true! The real background is that wine sets the default scissor rect to {0,0,0,0} but on windows it is set to another size, I have written a patch for that, but it looks like there is something incomplete (see http://www.winehq.org/pipermail/wine-patches/2008-August/059891.html ). When the game is starting it retrieves the initial value with GetScissorRect which is in wine the null-rect. And so nothing is rendered to the screen.
Cheers Rico