mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
- Properly implement LookupIconIdFromDirectoryEx.
- Remove hack for GetDeviceCaps. - This fixes one part of the Win32k Initialization Bug. If this change creates a problem some where else, the problem is not in this change. svn path=/trunk/; revision=38189
This commit is contained in:
@@ -505,11 +505,6 @@ GetDeviceCaps(HDC hDC,
|
||||
}
|
||||
else
|
||||
{
|
||||
// HAX!!!!
|
||||
// Due to winlogon process/thread mapping issues we have this hax!
|
||||
// FIXME!!! This is a victim of the Win32k Initialization BUG!!!!!
|
||||
return NtGdiGetDeviceCaps(hDC,i);
|
||||
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr))
|
||||
return 0;
|
||||
if (!(Dc_Attr->ulDirty_ & DC_PRIMARY_DISPLAY) )
|
||||
|
||||
@@ -658,6 +658,9 @@ LookupIconIdFromDirectoryEx(PBYTE xdir,
|
||||
{
|
||||
GRPCURSORICONDIR *dir = (GRPCURSORICONDIR*)xdir;
|
||||
UINT retVal = 0;
|
||||
|
||||
GetConnected();
|
||||
|
||||
if(dir && !dir->idReserved && (IMAGE_ICON == dir->idType || IMAGE_CURSOR == dir->idType))
|
||||
{
|
||||
GRPCURSORICONDIRENTRY *entry = NULL;
|
||||
@@ -667,11 +670,13 @@ LookupIconIdFromDirectoryEx(PBYTE xdir,
|
||||
{
|
||||
ColorBits = 1;
|
||||
}
|
||||
else if (g_psi->SystemMetrics[SM_SAMEDISPLAYFORMAT] || (cFlag & LR_VGACOLOR) )
|
||||
{
|
||||
ColorBits = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
HDC hdc = CreateICW(NULL, NULL, NULL, NULL);
|
||||
ColorBits = GetDeviceCaps(hdc, BITSPIXEL);
|
||||
DeleteDC(hdc);
|
||||
ColorBits = 0;
|
||||
}
|
||||
|
||||
if(bIcon)
|
||||
|
||||
@@ -153,6 +153,8 @@ EnableWindow(HWND hWnd,
|
||||
SHORT WINAPI
|
||||
GetAsyncKeyState(int vKey)
|
||||
{
|
||||
if (vKey < 0 || vKey > 256)
|
||||
return 0;
|
||||
return (SHORT) NtUserGetAsyncKeyState((DWORD) vKey);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user