gdi: Fix a couple of todos in the bitmap test.
This commit is contained in:
parent
5df3e57254
commit
e6f16250b2
@ -653,9 +653,9 @@ static INT BITMAP_GetObject16( HGDIOBJ handle, void *obj, INT count, LPVOID buff
|
|||||||
bmp16.bmPlanes = bmp->bitmap.bmPlanes;
|
bmp16.bmPlanes = bmp->bitmap.bmPlanes;
|
||||||
bmp16.bmBitsPixel = bmp->bitmap.bmBitsPixel;
|
bmp16.bmBitsPixel = bmp->bitmap.bmBitsPixel;
|
||||||
bmp16.bmBits = (SEGPTR)0;
|
bmp16.bmBits = (SEGPTR)0;
|
||||||
if (count > sizeof(bmp16)) count = sizeof(bmp16);
|
if (count < sizeof(bmp16)) return 0;
|
||||||
memcpy( buffer, &bmp16, count );
|
memcpy( buffer, &bmp16, sizeof(bmp16) );
|
||||||
return count;
|
return sizeof(bmp16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -685,11 +685,10 @@ static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( !buffer )
|
if( !buffer ) return sizeof(BITMAP);
|
||||||
return sizeof(BITMAP);
|
if (count < sizeof(BITMAP)) return 0;
|
||||||
if (count > sizeof(BITMAP)) count = sizeof(BITMAP);
|
memcpy( buffer, &bmp->bitmap, sizeof(BITMAP) );
|
||||||
memcpy( buffer, &bmp->bitmap, count );
|
return sizeof(BITMAP);
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,17 +1044,13 @@ static void test_bitmap(void)
|
|||||||
ok(ret == sizeof(bm), "%d != %d\n", ret, sizeof(bm));
|
ok(ret == sizeof(bm), "%d != %d\n", ret, sizeof(bm));
|
||||||
|
|
||||||
ret = GetObject(hbmp, sizeof(bm) / 2, &bm);
|
ret = GetObject(hbmp, sizeof(bm) / 2, &bm);
|
||||||
todo_wine {
|
|
||||||
ok(ret == 0, "%d != 0\n", ret);
|
ok(ret == 0, "%d != 0\n", ret);
|
||||||
}
|
|
||||||
|
|
||||||
ret = GetObject(hbmp, 0, &bm);
|
ret = GetObject(hbmp, 0, &bm);
|
||||||
ok(ret == 0, "%d != 0\n", ret);
|
ok(ret == 0, "%d != 0\n", ret);
|
||||||
|
|
||||||
ret = GetObject(hbmp, 1, &bm);
|
ret = GetObject(hbmp, 1, &bm);
|
||||||
todo_wine {
|
|
||||||
ok(ret == 0, "%d != 0\n", ret);
|
ok(ret == 0, "%d != 0\n", ret);
|
||||||
}
|
|
||||||
|
|
||||||
DeleteObject(hbmp);
|
DeleteObject(hbmp);
|
||||||
DeleteDC(hdc);
|
DeleteDC(hdc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user