| Summary: | D3D_UpdateClipRect() sets the wrong width for the clip rect | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Bithika Mookherjee <bithika.mookherjee> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
Nice catch, thanks! http://hg.libsdl.org/SDL/rev/0ec51bd57d56 |
SDL_RenderSetClipRect() calls into renderer->UpdateClipRect(renderer). I am not sure if UpdateClipRect() can point to a number of clip rect update functions, but on my platform it calls D3D_UpdateClipRect(). In that function, the rect to pass to IDirect3DDevice9_SetScissorRect() has it's right field set as: r.right = rect->w + rect->w; But actually, this should be: r.right = rect->x + rect->w; i.e. the right coord of the rectangle should be x + width, ( not width + width ). I've made that change locally and rebuilt the libs, and it works for me.