Windows QPA: Fix pixel format looping in describeFormats()
As per MSDN, pixel format indices are 1-based, not 0-based. Change-Id: I6083144d3a95626e45bea21b50096b5f5f811c67 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
deee560954
commit
82c6911d7d
@ -323,7 +323,7 @@ static inline bool
|
||||
static void describeFormats(HDC hdc)
|
||||
{
|
||||
const int pfiMax = DescribePixelFormat(hdc, 0, 0, nullptr);
|
||||
for (int i = 0; i < pfiMax; i++) {
|
||||
for (int i = 1; i <= pfiMax; i++) {
|
||||
PIXELFORMATDESCRIPTOR pfd;
|
||||
initPixelFormatDescriptor(&pfd);
|
||||
DescribePixelFormat(hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user