fix GetPixels() bug #27.
This commit is contained in:
@@ -411,24 +411,24 @@ bool Monitor::GetPixels(BYTE* output, int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
left = y;
|
left = y;
|
||||||
top = monitorWidth - x - width;
|
top = monitorWidth - x - width;
|
||||||
right = y + width;
|
right = y + width - 1;
|
||||||
bottom = monitorWidth - x;
|
bottom = monitorWidth - x - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DXGI_MODE_ROTATION_ROTATE180:
|
case DXGI_MODE_ROTATION_ROTATE180:
|
||||||
{
|
{
|
||||||
left = monitorWidth - x - width;
|
left = monitorWidth - x - width;
|
||||||
top = monitorHeight - y - height;
|
top = monitorHeight - y - height;
|
||||||
right = monitorWidth - x;
|
right = monitorWidth - x - 1;
|
||||||
bottom = monitorHeight - y;
|
bottom = monitorHeight - y - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DXGI_MODE_ROTATION_ROTATE270:
|
case DXGI_MODE_ROTATION_ROTATE270:
|
||||||
{
|
{
|
||||||
left = monitorHeight - y - height;
|
left = monitorHeight - y - height;
|
||||||
top = x;
|
top = x;
|
||||||
right = monitorHeight - y;
|
right = monitorHeight - y - 1;
|
||||||
bottom = x + width;
|
bottom = x + width - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DXGI_MODE_ROTATION_IDENTITY:
|
case DXGI_MODE_ROTATION_IDENTITY:
|
||||||
@@ -437,8 +437,8 @@ bool Monitor::GetPixels(BYTE* output, int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
left = x;
|
left = x;
|
||||||
top = y;
|
top = y;
|
||||||
right = x + width;
|
right = x + width - 1;
|
||||||
bottom = y + height;
|
bottom = y + height - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user