mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 04:03:56 +00:00
[WIN32K]
- Fix the bitmap alignment issue that caused broken scrollbar pattern svn path=/trunk/; revision=51885
This commit is contained in:
parent
fc94016a41
commit
54b14d414e
2 changed files with 5 additions and 11 deletions
|
@ -92,7 +92,9 @@ UserInitialize(
|
||||||
HANDLE hPowerRequestEvent,
|
HANDLE hPowerRequestEvent,
|
||||||
HANDLE hMediaRequestEvent)
|
HANDLE hMediaRequestEvent)
|
||||||
{
|
{
|
||||||
static const WORD wPattern55AA[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa };
|
static const WORD wPattern55AA[] =
|
||||||
|
{ 0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0,
|
||||||
|
0x5555, 0, 0xaaaa, 0, 0x5555, 0, 0xaaaa, 0 };
|
||||||
HBITMAP hPattern55AABitmap = NULL;
|
HBITMAP hPattern55AABitmap = NULL;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
|
|
@ -154,23 +154,15 @@ GreCreateBitmap(
|
||||||
IN UINT cBitsPixel,
|
IN UINT cBitsPixel,
|
||||||
IN OPTIONAL PVOID pvBits)
|
IN OPTIONAL PVOID pvBits)
|
||||||
{
|
{
|
||||||
HBITMAP hbmp;
|
|
||||||
/* Call the extended function */
|
/* Call the extended function */
|
||||||
hbmp = GreCreateBitmapEx(nWidth,
|
return GreCreateBitmapEx(nWidth,
|
||||||
nHeight,
|
nHeight,
|
||||||
0, /* auto width */
|
0, /* auto width */
|
||||||
BitmapFormat(cBitsPixel * cPlanes, BI_RGB),
|
BitmapFormat(cBitsPixel * cPlanes, BI_RGB),
|
||||||
0, /* no bitmap flags */
|
0, /* no bitmap flags */
|
||||||
0, /* auto size */
|
0, /* auto size */
|
||||||
NULL,
|
pvBits,
|
||||||
DDB_SURFACE /* DDB */);
|
DDB_SURFACE /* DDB */);
|
||||||
if (pvBits && hbmp)
|
|
||||||
{
|
|
||||||
PSURFACE psurf = SURFACE_ShareLockSurface(hbmp);
|
|
||||||
UnsafeSetBitmapBits(psurf, 0, pvBits);
|
|
||||||
SURFACE_ShareUnlockSurface(psurf);
|
|
||||||
}
|
|
||||||
return hbmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HBITMAP
|
HBITMAP
|
||||||
|
|
Loading…
Reference in a new issue