mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[WIN32K] Code formatting.
This commit is contained in:
parent
75f188c200
commit
0ad90f83d3
3 changed files with 24 additions and 24 deletions
|
@ -51,8 +51,8 @@ EngpPopulateDeviceModeList(
|
||||||
* This is a REG_MULTI_SZ string */
|
* This is a REG_MULTI_SZ string */
|
||||||
for (; *pwsz; pwsz += wcslen(pwsz) + 1)
|
for (; *pwsz; pwsz += wcslen(pwsz) + 1)
|
||||||
{
|
{
|
||||||
TRACE("trying driver: %ls\n", pwsz);
|
|
||||||
/* Try to load the display driver */
|
/* Try to load the display driver */
|
||||||
|
TRACE("Trying driver: %ls\n", pwsz);
|
||||||
pldev = EngLoadImageEx(pwsz, LDEV_DEVICE_DISPLAY);
|
pldev = EngLoadImageEx(pwsz, LDEV_DEVICE_DISPLAY);
|
||||||
if (!pldev)
|
if (!pldev)
|
||||||
{
|
{
|
||||||
|
@ -186,14 +186,14 @@ EngpRegisterGraphicsDevice(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to open the driver */
|
/* Try to open and enable the device */
|
||||||
Status = IoGetDeviceObjectPointer(pustrDeviceName,
|
Status = IoGetDeviceObjectPointer(pustrDeviceName,
|
||||||
FILE_READ_DATA | FILE_WRITE_DATA,
|
FILE_READ_DATA | FILE_WRITE_DATA,
|
||||||
&pFileObject,
|
&pFileObject,
|
||||||
&pDeviceObject);
|
&pDeviceObject);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("Could not open driver %wZ, 0x%lx\n", pustrDeviceName, Status);
|
ERR("Could not open device %wZ, 0x%lx\n", pustrDeviceName, Status);
|
||||||
ExFreePoolWithTag(pGraphicsDevice, GDITAG_GDEVICE);
|
ExFreePoolWithTag(pGraphicsDevice, GDITAG_GDEVICE);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -225,13 +225,13 @@ EngpRegisterGraphicsDevice(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy display driver names */
|
/* Copy the display driver names */
|
||||||
pGraphicsDevice->pDiplayDrivers = pwsz;
|
pGraphicsDevice->pDiplayDrivers = pwsz;
|
||||||
RtlCopyMemory(pGraphicsDevice->pDiplayDrivers,
|
RtlCopyMemory(pGraphicsDevice->pDiplayDrivers,
|
||||||
pustrDiplayDrivers->Buffer,
|
pustrDiplayDrivers->Buffer,
|
||||||
pustrDiplayDrivers->Length);
|
pustrDiplayDrivers->Length);
|
||||||
|
|
||||||
/* Copy description */
|
/* Copy the description */
|
||||||
pGraphicsDevice->pwszDescription = pwsz + pustrDiplayDrivers->Length / sizeof(WCHAR);
|
pGraphicsDevice->pwszDescription = pwsz + pustrDiplayDrivers->Length / sizeof(WCHAR);
|
||||||
RtlCopyMemory(pGraphicsDevice->pwszDescription,
|
RtlCopyMemory(pGraphicsDevice->pwszDescription,
|
||||||
pustrDescription->Buffer,
|
pustrDescription->Buffer,
|
||||||
|
@ -265,7 +265,7 @@ EngpRegisterGraphicsDevice(
|
||||||
if (!gpGraphicsDeviceFirst)
|
if (!gpGraphicsDeviceFirst)
|
||||||
gpGraphicsDeviceFirst = pGraphicsDevice;
|
gpGraphicsDeviceFirst = pGraphicsDevice;
|
||||||
|
|
||||||
/* Increment device number */
|
/* Increment the device number */
|
||||||
giDevNum++;
|
giDevNum++;
|
||||||
|
|
||||||
/* Unlock loader */
|
/* Unlock loader */
|
||||||
|
@ -275,7 +275,6 @@ EngpRegisterGraphicsDevice(
|
||||||
return pGraphicsDevice;
|
return pGraphicsDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PGRAPHICS_DEVICE
|
PGRAPHICS_DEVICE
|
||||||
NTAPI
|
NTAPI
|
||||||
EngpFindGraphicsDevice(
|
EngpFindGraphicsDevice(
|
||||||
|
@ -321,7 +320,6 @@ EngpFindGraphicsDevice(
|
||||||
return pGraphicsDevice;
|
return pGraphicsDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
EngpFileIoRequest(
|
EngpFileIoRequest(
|
||||||
|
|
|
@ -90,15 +90,15 @@ PDEVOBJ_vDeletePDEV(
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
PDEVOBJ_vRelease(PPDEVOBJ ppdev)
|
PDEVOBJ_vRelease(
|
||||||
|
_Inout_ PPDEVOBJ ppdev)
|
||||||
{
|
{
|
||||||
/* Lock loader */
|
/* Lock loader */
|
||||||
EngAcquireSemaphore(ghsemPDEV);
|
EngAcquireSemaphore(ghsemPDEV);
|
||||||
|
|
||||||
/* Decrease reference count */
|
/* Decrease reference count */
|
||||||
--ppdev->cPdevRefs;
|
InterlockedDecrement(&ppdev->cPdevRefs);
|
||||||
|
ASSERT(ppdev->cPdevRefs >= 0);
|
||||||
ASSERT(ppdev->cPdevRefs >= 0) ;
|
|
||||||
|
|
||||||
/* Check if references are left */
|
/* Check if references are left */
|
||||||
if (ppdev->cPdevRefs == 0)
|
if (ppdev->cPdevRefs == 0)
|
||||||
|
@ -112,7 +112,7 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do we have a palette? */
|
/* Do we have a palette? */
|
||||||
if(ppdev->ppalSurf)
|
if (ppdev->ppalSurf)
|
||||||
{
|
{
|
||||||
PALETTE_ShareUnlockPalette(ppdev->ppalSurf);
|
PALETTE_ShareUnlockPalette(ppdev->ppalSurf);
|
||||||
}
|
}
|
||||||
|
@ -125,20 +125,22 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove it from list */
|
/* Remove it from list */
|
||||||
if( ppdev == gppdevList )
|
if (ppdev == gppdevList)
|
||||||
gppdevList = ppdev->ppdevNext ;
|
{
|
||||||
|
gppdevList = ppdev->ppdevNext;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PPDEVOBJ ppdevCurrent = gppdevList;
|
PPDEVOBJ ppdevCurrent = gppdevList;
|
||||||
BOOL found = FALSE ;
|
BOOL found = FALSE;
|
||||||
while (!found && ppdevCurrent->ppdevNext)
|
while (!found && ppdevCurrent->ppdevNext)
|
||||||
{
|
{
|
||||||
if (ppdevCurrent->ppdevNext == ppdev)
|
if (ppdevCurrent->ppdevNext == ppdev)
|
||||||
found = TRUE;
|
found = TRUE;
|
||||||
else
|
else
|
||||||
ppdevCurrent = ppdevCurrent->ppdevNext ;
|
ppdevCurrent = ppdevCurrent->ppdevNext;
|
||||||
}
|
}
|
||||||
if(found)
|
if (found)
|
||||||
ppdevCurrent->ppdevNext = ppdev->ppdevNext;
|
ppdevCurrent->ppdevNext = ppdev->ppdevNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,7 +154,6 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev)
|
||||||
|
|
||||||
/* Unlock loader */
|
/* Unlock loader */
|
||||||
EngReleaseSemaphore(ghsemPDEV);
|
EngReleaseSemaphore(ghsemPDEV);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
@ -320,7 +321,7 @@ PDEVOBJ_pdmMatchDevMode(
|
||||||
|
|
||||||
/* Compare asked DEVMODE fields
|
/* Compare asked DEVMODE fields
|
||||||
* Only compare those that are valid in both DEVMODE structs */
|
* Only compare those that are valid in both DEVMODE structs */
|
||||||
dwFields = pdmCurrent->dmFields & pdm->dmFields ;
|
dwFields = pdmCurrent->dmFields & pdm->dmFields;
|
||||||
|
|
||||||
/* For now, we only need those */
|
/* For now, we only need those */
|
||||||
if ((dwFields & DM_BITSPERPEL) &&
|
if ((dwFields & DM_BITSPERPEL) &&
|
||||||
|
@ -348,6 +349,7 @@ EngpCreatePDEV(
|
||||||
{
|
{
|
||||||
PGRAPHICS_DEVICE pGraphicsDevice;
|
PGRAPHICS_DEVICE pGraphicsDevice;
|
||||||
PPDEVOBJ ppdev;
|
PPDEVOBJ ppdev;
|
||||||
|
|
||||||
DPRINT("EngpCreatePDEV(%wZ, %p)\n", pustrDeviceName, pdm);
|
DPRINT("EngpCreatePDEV(%wZ, %p)\n", pustrDeviceName, pdm);
|
||||||
|
|
||||||
/* Try to find the GRAPHICS_DEVICE */
|
/* Try to find the GRAPHICS_DEVICE */
|
||||||
|
@ -407,7 +409,7 @@ EngpCreatePDEV(
|
||||||
ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject;
|
ppdev->hSpooler = ppdev->pGraphicsDevice->DeviceObject;
|
||||||
|
|
||||||
// Should we change the ative mode of pGraphicsDevice ?
|
// Should we change the ative mode of pGraphicsDevice ?
|
||||||
ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, pdm) ;
|
ppdev->pdmwDev = PDEVOBJ_pdmMatchDevMode(ppdev, pdm);
|
||||||
|
|
||||||
/* FIXME! */
|
/* FIXME! */
|
||||||
ppdev->flFlags = PDEV_DISPLAY;
|
ppdev->flFlags = PDEV_DISPLAY;
|
||||||
|
@ -561,7 +563,7 @@ PDEVOBJ_bSwitchMode(
|
||||||
PDEVOBJ_vRelease(ppdevTmp);
|
PDEVOBJ_vRelease(ppdevTmp);
|
||||||
|
|
||||||
/* Update primary display capabilities */
|
/* Update primary display capabilities */
|
||||||
if(ppdev == gppdevPrimary)
|
if (ppdev == gppdevPrimary)
|
||||||
{
|
{
|
||||||
PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps);
|
PDEVOBJ_vGetDeviceCaps(ppdev, &GdiHandleTable->DevCaps);
|
||||||
}
|
}
|
||||||
|
|
|
@ -557,7 +557,7 @@ UserEnumRegistryDisplaySettings(
|
||||||
ZwClose(hkey);
|
ZwClose(hkey);
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
return Status ;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -674,6 +674,7 @@ NtUserEnumDisplaySettings(
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
UserUpdateFullscreen(
|
UserUpdateFullscreen(
|
||||||
DWORD flags)
|
DWORD flags)
|
||||||
|
@ -1012,4 +1013,3 @@ NtUserChangeDisplaySettings(
|
||||||
|
|
||||||
return lRet;
|
return lRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue