Fix D3D9 viewport when X/Y is < 0.

This commit is contained in:
Themaister 2013-04-21 11:21:53 +02:00
parent 53b7d43b67
commit c7471ac133
1 changed files with 2 additions and 2 deletions

View File

@ -208,8 +208,8 @@ void D3DVideo::init(const video_info_t &info)
void D3DVideo::set_viewport(int x, int y, unsigned width, unsigned height)
{
D3DVIEWPORT9 viewport;
viewport.X = x;
viewport.Y = y;
viewport.X = max(x, 0); // D3D9 doesn't support negative X/Y viewports ...
viewport.Y = max(y, 0);
viewport.Width = width;
viewport.Height = height;
viewport.MinZ = 0.0f;