ReactOS  0.4.14-dev-552-g2fad488
enable.c File Reference
#include <vgaddi.h>
Include dependency graph for enable.c:

Go to the source code of this file.

Classes

struct  _VGALOGPALETTE
 

Macros

#define SYSTM_LOGFONT   {16,7,0,0,700,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,VARIABLE_PITCH | FF_DONTCARE, L"System"}
 
#define HELVE_LOGFONT   {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,VARIABLE_PITCH | FF_DONTCARE, L"MS Sans Serif"}
 
#define COURI_LOGFONT   {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,FIXED_PITCH | FF_DONTCARE, L"Courier"}
 

Typedefs

typedef struct _VGALOGPALETTE VGALOGPALETTE
 

Functions

BOOL APIENTRY DrvEnableDriver (IN ULONG EngineVersion, IN ULONG SizeOfDED, OUT PDRVENABLEDATA DriveEnableData)
 
VOID APIENTRY DrvDisableDriver (VOID)
 
DHPDEV APIENTRY DrvEnablePDEV (IN DEVMODEW *DM, IN LPWSTR LogAddress, IN ULONG PatternCount, OUT HSURF *SurfPatterns, IN ULONG GDIInfoSize, OUT ULONG *GDIInfo, IN ULONG DevInfoSize, OUT DEVINFO *DevInfo, IN HDEV Dev, IN LPWSTR DeviceName, IN HANDLE Driver)
 
VOID APIENTRY DrvCompletePDEV (IN DHPDEV PDev, IN HDEV Dev)
 
BOOL APIENTRY DrvAssertMode (IN DHPDEV DPev, IN BOOL Enable)
 
VOID APIENTRY DrvDisablePDEV (IN DHPDEV PDev)
 
VOID APIENTRY DrvDisableSurface (IN DHPDEV PDev)
 
static VOID InitSavedBits (IN PPDEV ppdev)
 
HSURF APIENTRY DrvEnableSurface (IN DHPDEV PDev)
 
ULONG APIENTRY DrvGetModes (IN HANDLE Driver, IN ULONG DataSize, OUT PDEVMODEW DM)
 
ULONG DbgPrint (PCCH Format,...)
 

Variables

static BOOL VGAInitialized = FALSE
 
static DRVFN FuncList []
 
static GDIINFO gaulCap
 
const VGALOGPALETTE VGApalette
 
DEVINFO devinfoVGA
 

Macro Definition Documentation

◆ COURI_LOGFONT

#define COURI_LOGFONT   {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,FIXED_PITCH | FF_DONTCARE, L"Courier"}

Definition at line 169 of file enable.c.

◆ HELVE_LOGFONT

#define HELVE_LOGFONT   {12,9,0,0,400,0,0,0,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_STROKE_PRECIS,PROOF_QUALITY,VARIABLE_PITCH | FF_DONTCARE, L"MS Sans Serif"}

Definition at line 168 of file enable.c.

◆ SYSTM_LOGFONT

Definition at line 167 of file enable.c.

Typedef Documentation

◆ VGALOGPALETTE

Function Documentation

◆ DbgPrint()

ULONG DbgPrint ( PCCH  Format,
  ... 
)

Definition at line 589 of file enable.c.

590 {
591  va_list ap;
592  va_start(ap, Format);
593  EngDebugPrint("VGADDI", (PCHAR)Format, ap);
594  va_end(ap);
595  return 0;
596 }
signed char * PCHAR
Definition: retypes.h:7
ENGAPI VOID APIENTRY EngDebugPrint(_In_z_ PCHAR StandardPrefix, _In_z_ PCHAR DebugMessage, _In_ va_list ap)
Definition: debug.c:19
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32

Referenced by BmfdCompletePDEV(), BmfdDisablePDEV(), BmfdEnableDriver(), BmfdEnablePDEV(), FtfdCompletePDEV(), FtfdDisablePDEV(), FtfdEnableDriver(), and FtfdEnablePDEV().

◆ DrvAssertMode()

BOOL APIENTRY DrvAssertMode ( IN DHPDEV  DPev,
IN BOOL  Enable 
)

Definition at line 299 of file enable.c.

301 {
302  PPDEV ppdev = (PPDEV)DPev;
303  ULONG returnedDataLength;
304 
305  if (Enable)
306  {
307  /* Reenable our graphics mode */
308  if (!InitPointer(ppdev))
309  {
310  /* Failed to set pointer */
311  return FALSE;
312  }
313 
314  if (!VGAInitialized)
315  {
316  if (!InitVGA(ppdev, FALSE))
317  {
318  /* Failed to initialize the VGA */
319  return FALSE;
320  }
322  }
323  }
324  else
325  {
326  /* Go back to last known mode */
327  DPRINT( "ppdev: %x, KMDriver: %x", ppdev, ppdev->KMDriver );
328  if (EngDeviceIoControl(ppdev->KMDriver, IOCTL_VIDEO_RESET_DEVICE, NULL, 0, NULL, 0, &returnedDataLength))
329  {
330  /* Failed to go back to mode */
331  return FALSE;
332  }
334  }
335  return TRUE;
336 }
#define TRUE
Definition: types.h:120
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
#define IOCTL_VIDEO_RESET_DEVICE
Definition: ntddvdeo.h:137
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
BOOL InitPointer(PPDEV ppdev)
Definition: pointer.c:143
HANDLE KMDriver
Definition: vgaddi.h:108
struct _PDEV * PPDEV
Definition: framebuf.h:33
static BOOL VGAInitialized
Definition: enable.c:11
unsigned int ULONG
Definition: retypes.h:1
BOOL InitVGA(PPDEV ppdev, BOOL bFirst)
Definition: screen.c:134

◆ DrvCompletePDEV()

VOID APIENTRY DrvCompletePDEV ( IN DHPDEV  PDev,
IN HDEV  Dev 
)

Definition at line 291 of file enable.c.

293 {
294  ((PPDEV) PDev)->GDIDevHandle = Dev; // Handle to the DC
295 }
struct _PDEV * PPDEV

◆ DrvDisableDriver()

VOID APIENTRY DrvDisableDriver ( VOID  )

Definition at line 215 of file enable.c.

216 {
217  return;
218 }

◆ DrvDisablePDEV()

VOID APIENTRY DrvDisablePDEV ( IN DHPDEV  PDev)

Definition at line 340 of file enable.c.

341 {
342  PPDEV ppdev = (PPDEV)PDev;
343 
344  /* EngDeletePalette(devinfoVGA.hpalDefault); */
345  if (ppdev->pjPreallocSSBBuffer)
347 
348  if (ppdev->pucDIB4ToVGAConvBuffer)
350 
351  DPRINT("Freeing PDEV\n");
352  EngFreeMem(PDev);
353 }
#define EngFreeMem
Definition: polytest.cpp:56
PUCHAR pucDIB4ToVGAConvBuffer
Definition: vgaddi.h:130
void DPRINT(...)
Definition: polytest.cpp:61
PUCHAR pjPreallocSSBBuffer
Definition: vgaddi.h:125
struct _PDEV * PPDEV
Definition: framebuf.h:33

◆ DrvDisableSurface()

VOID APIENTRY DrvDisableSurface ( IN DHPDEV  PDev)

Definition at line 357 of file enable.c.

358 {
359  PPDEV ppdev = (PPDEV)PDev;
360  PDEVSURF pdsurf = ppdev->AssociatedSurf;
361 
362  DPRINT("KMDriver: %x\n", ppdev->KMDriver);
363  DeinitVGA(ppdev);
364  /* EngFreeMem(pdsurf->BankSelectInfo); */
365 
366  if (pdsurf->BankInfo != NULL)
367  EngFreeMem(pdsurf->BankInfo);
368  if (pdsurf->BankInfo2RW != NULL)
369  EngFreeMem(pdsurf->BankInfo2RW);
370  if (pdsurf->BankBufferPlane0 != NULL)
371  EngFreeMem(pdsurf->BankBufferPlane0);
372  if (ppdev->pPointerAttributes != NULL)
374 
375  /* free any pending saved screen bit blocks */
376 #if 0
377  pSSB = pdsurf->ssbList;
378  while (pSSB != (PSAVED_SCREEN_BITS) NULL)
379  {
380  /* Point to the next saved screen bits block */
381  pSSBNext = (PSAVED_SCREEN_BITS) pSSB->pvNextSSB;
382 
383  /* Free the current block */
384  EngFreeMem(pSSB);
385  pSSB = pSSBNext;
386  }
387 #endif
389  /* EngFreeMem(pdsurf); */ /* free the surface */
390 }
HSURF SurfHandle
Definition: vgaddi.h:110
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:564
struct _SAVED_SCREEN_BITS * PSAVED_SCREEN_BITS
#define EngFreeMem
Definition: polytest.cpp:56
PSAVED_SCREEN_BITS ssbList
Definition: vgaddi.h:226
PVOID AssociatedSurf
Definition: vgaddi.h:111
PBANK_INFO BankInfo
Definition: vgaddi.h:198
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
HANDLE KMDriver
Definition: vgaddi.h:108
struct _PDEV * PPDEV
Definition: framebuf.h:33
PVIDEO_POINTER_ATTRIBUTES pPointerAttributes
Definition: driver.h:45
BOOL DeinitVGA(PPDEV ppdev)
Definition: screen.c:112
PVOID BankBufferPlane0
Definition: vgaddi.h:208
PBANK_INFO BankInfo2RW
Definition: vgaddi.h:200

◆ DrvEnableDriver()

BOOL APIENTRY DrvEnableDriver ( IN ULONG  EngineVersion,
IN ULONG  SizeOfDED,
OUT PDRVENABLEDATA  DriveEnableData 
)

Definition at line 189 of file enable.c.

192 {
193  DPRINT("DrvEnableDriver called...\n");
194 
195  vgaPreCalc();
196 
197  VGADDI_InitializeOffScreenMem((SCREEN_X * SCREEN_Y) >> 3, 65536 - ((SCREEN_X * SCREEN_Y) >> 3));
198 
199  DriveEnableData->pdrvfn = FuncList;
200  DriveEnableData->c = sizeof(FuncList) / sizeof(DRVFN);
201  DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION_NT4;
202 
203  return TRUE;
204 }
#define TRUE
Definition: types.h:120
#define SCREEN_X
Definition: vgavideo.h:2
#define SCREEN_Y
Definition: vgavideo.h:3
static DRVFN FuncList[]
Definition: enable.c:13
void DPRINT(...)
Definition: polytest.cpp:61
#define DDI_DRIVER_VERSION_NT4
Definition: winddi.h:535
VOID VGADDI_InitializeOffScreenMem(IN ULONG Start, IN ULONG Length)
Definition: offscreen.c:164
VOID vgaPreCalc()
Definition: vgavideo.c:58
Definition: winddi.h:529

◆ DrvEnablePDEV()

DHPDEV APIENTRY DrvEnablePDEV ( IN DEVMODEW DM,
IN LPWSTR  LogAddress,
IN ULONG  PatternCount,
OUT HSURF SurfPatterns,
IN ULONG  GDIInfoSize,
OUT ULONG GDIInfo,
IN ULONG  DevInfoSize,
OUT DEVINFO DevInfo,
IN HDEV  Dev,
IN LPWSTR  DeviceName,
IN HANDLE  Driver 
)

Definition at line 244 of file enable.c.

255 {
256  PPDEV PDev;
257 
258  PDev = EngAllocMem(FL_ZERO_MEMORY, sizeof(PDEV), ALLOC_TAG);
259  if (PDev == NULL)
260  {
261  DPRINT1("EngAllocMem failed for PDEV\n");
262  return NULL;
263  }
264  PDev->KMDriver = Driver;
265  DPRINT( "PDev: %x, Driver: %x\n", PDev, PDev->KMDriver );
266 
269  if (sizeof(GDIINFO) < GDIInfoSize)
270  GDIInfoSize = sizeof(GDIINFO);
271  memcpy(GDIInfo, &gaulCap, GDIInfoSize);
272  DM->dmBitsPerPel = gaulCap.cBitsPixel * gaulCap.cPlanes;
273  DM->dmPelsWidth = gaulCap.ulHorzRes;
274  DM->dmPelsHeight = gaulCap.ulVertRes;
275 
277  if (sizeof(DEVINFO) < DevInfoSize)
278  DevInfoSize = sizeof(DEVINFO);
279  memcpy(DevInfo, &devinfoVGA, DevInfoSize);
280 
281  return (DHPDEV) PDev;
282 }
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
#define SCREEN_X
Definition: vgavideo.h:2
PALETTEENTRY PaletteEntry[16]
Definition: enable.c:137
_Must_inspect_result_ ENGAPI HPALETTE APIENTRY EngCreatePalette(_In_ ULONG iMode, _In_ ULONG cColors, _In_ ULONG *pulColors, _In_ FLONG flRed, _In_ FLONG flGreen, _In_ FLONG flBlue)
ULONG cPlanes
Definition: winddi.h:885
#define SCREEN_Y
Definition: vgavideo.h:3
#define ALLOC_TAG
Definition: btrfs_drv.h:91
struct _DEVINFO DEVINFO
HPALETTE hpalDefault
Definition: winddi.h:398
ULONG ulHorzRes
Definition: winddi.h:882
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
const VGALOGPALETTE VGApalette
Definition: enable.c:140
_In_ PCUNICODE_STRING _In_ PVOID Driver
Definition: cmfuncs.h:32
HANDLE KMDriver
Definition: vgaddi.h:108
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
Definition: framebuf.h:33
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
ULONG cBitsPixel
Definition: winddi.h:884
DEVINFO devinfoVGA
Definition: enable.c:171
static GDIINFO gaulCap
Definition: enable.c:58
#define DPRINT1
Definition: precomp.h:8
#define DM
Definition: ftp_var.h:26
unsigned int ULONG
Definition: retypes.h:1
ULONG ulVertRes
Definition: winddi.h:883
struct _GDIINFO GDIINFO

◆ DrvEnableSurface()

HSURF APIENTRY DrvEnableSurface ( IN DHPDEV  PDev)

Definition at line 434 of file enable.c.

435 {
436  PPDEV ppdev = (PPDEV)PDev;
437  PDEVSURF pdsurf;
438  DHSURF dhsurf;
439  HSURF hsurf;
440 
441  DPRINT("DrvEnableSurface() called\n");
442 
443  /* Initialize the VGA */
444  if (!VGAInitialized)
445  {
446  if (!InitVGA(ppdev, TRUE))
447  goto error_done;
449  }
450 
451  /* dhsurf is of type DEVSURF, which is the drivers specialized surface type */
452  dhsurf = (DHSURF)EngAllocMem(0, sizeof(DEVSURF), ALLOC_TAG);
453  if (dhsurf == (DHSURF) 0)
454  goto error_done;
455 
456  pdsurf = (PDEVSURF) dhsurf;
457  pdsurf->ident = DEVSURF_IDENT;
458  pdsurf->flSurf = 0;
459  pdsurf->Format = BMF_PHYSDEVICE;
460  pdsurf->jReserved1 = 0;
461  pdsurf->jReserved2 = 0;
462  pdsurf->ppdev = ppdev;
463  pdsurf->sizeSurf.cx = ppdev->sizeSurf.cx;
464  pdsurf->sizeSurf.cy = ppdev->sizeSurf.cy;
465  pdsurf->NextPlane = 0;
466  pdsurf->Scan0 = ppdev->fbScreen;
467  pdsurf->BitmapStart = ppdev->fbScreen;
468  pdsurf->StartBmp = ppdev->fbScreen;
469  pdsurf->BankInfo = NULL;
470  pdsurf->BankInfo2RW = NULL;
471  pdsurf->BankBufferPlane0 = NULL;
472 
473 /* pdsurf->Conv = &ConvertBuffer[0]; */
474 
475  if (!InitPointer(ppdev))
476  {
477  DPRINT1("DrvEnablePDEV failed bInitPointer\n");
478  goto error_clean;
479  }
480 
481 /* if (!SetUpBanking(pdsurf, ppdev))
482  {
483  DPRINT1("DrvEnablePDEV failed SetUpBanking\n");
484  goto error_clean;
485  } BANKING CODE UNIMPLEMENTED */
486 
487  if ((hsurf = EngCreateDeviceSurface(dhsurf, ppdev->sizeSurf, BMF_4BPP)) ==
488  (HSURF)0)
489  {
490  /* Call to EngCreateDeviceSurface failed */
491  DPRINT("EngCreateDeviceSurface call failed\n");
492  goto error_clean;
493  }
494 
495  InitSavedBits(ppdev);
496 
499  {
500  DPRINT("Successfully associated surface\n");
501  ppdev->SurfHandle = hsurf;
502  ppdev->AssociatedSurf = pdsurf;
503 
504  /* Set up an empty saved screen block list */
505  pdsurf->ssbList = NULL;
506 
507  return hsurf;
508  }
509  DPRINT("EngAssociateSurface() failed\n");
510  EngDeleteSurface(hsurf);
511 
512 error_clean:
513  EngFreeMem(dhsurf);
514 
515 error_done:
516  return (HSURF)0;
517 }
PVOID StartBmp
Definition: vgaddi.h:181
Definition: xlate.c:9
HSURF SurfHandle
Definition: vgaddi.h:110
#define TRUE
Definition: types.h:120
#define DEVSURF_IDENT
Definition: vgaddi.h:240
ENGAPI BOOL APIENTRY EngDeleteSurface(_In_ _Post_ptr_invalid_ HSURF hsurf)
Definition: surface.c:564
#define HOOK_TRANSPARENTBLT
Definition: winddi.h:1434
PVOID Scan0
Definition: vgaddi.h:179
#define EngFreeMem
Definition: polytest.cpp:56
BYTE jReserved2
Definition: vgaddi.h:174
PSAVED_SCREEN_BITS ssbList
Definition: vgaddi.h:226
PVOID AssociatedSurf
Definition: vgaddi.h:111
#define ALLOC_TAG
Definition: btrfs_drv.h:91
PBANK_INFO BankInfo
Definition: vgaddi.h:198
SIZEL sizeSurf
Definition: vgaddi.h:136
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:334
void DPRINT(...)
Definition: polytest.cpp:61
PBYTE fbScreen
Definition: vgaddi.h:137
#define HOOK_LINETO
Definition: winddi.h:1428
BOOL InitPointer(PPDEV ppdev)
Definition: pointer.c:143
typedef HSURF(APIENTRY FN_DrvEnableSurface)(_In_ DHPDEV dhpdev)
#define HOOK_BITBLT
Definition: winddi.h:1420
PVOID BitmapStart
Definition: vgaddi.h:205
IDENT ident
Definition: vgaddi.h:165
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
struct _PDEV * PPDEV
Definition: framebuf.h:33
struct _DEVSURF * PDEVSURF
ENGAPI BOOL APIENTRY EngAssociateSurface(_In_ HSURF hsurf, _In_ HDEV hdev, _In_ FLONG flHooks)
Definition: surface.c:428
BYTE Format
Definition: vgaddi.h:172
PPDEV ppdev
Definition: vgaddi.h:175
ULONG NextPlane
Definition: vgaddi.h:178
#define HOOK_COPYBITS
Definition: winddi.h:1429
static VOID InitSavedBits(IN PPDEV ppdev)
Definition: enable.c:394
HDEV GDIDevHandle
Definition: vgaddi.h:109
SIZEL sizeSurf
Definition: vgaddi.h:176
ULONG flSurf
Definition: vgaddi.h:166
#define DPRINT1
Definition: precomp.h:8
PVOID BankBufferPlane0
Definition: vgaddi.h:208
_Must_inspect_result_ ENGAPI HSURF APIENTRY EngCreateDeviceSurface(_In_ DHSURF dhsurf, _In_ SIZEL sizl, _In_ ULONG iFormatCompat)
Definition: surface.c:388
static BOOL VGAInitialized
Definition: enable.c:11
#define BMF_PHYSDEVICE
Definition: vgaddi.h:234
#define HOOK_PAINT
Definition: winddi.h:1424
BYTE jReserved1
Definition: vgaddi.h:173
BOOL InitVGA(PPDEV ppdev, BOOL bFirst)
Definition: screen.c:134
LONG cy
Definition: windef.h:335
PBANK_INFO BankInfo2RW
Definition: vgaddi.h:200

◆ DrvGetModes()

ULONG APIENTRY DrvGetModes ( IN HANDLE  Driver,
IN ULONG  DataSize,
OUT PDEVMODEW  DM 
)

Definition at line 521 of file enable.c.

524 {
525  DWORD NumModes;
526  DWORD ModeSize;
527  DWORD OutputSize;
528  DWORD OutputModes = DataSize / (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
529  PVIDEO_MODE_INFORMATION VideoModeInformation, VideoTemp;
530 
531  NumModes = getAvailableModes(Driver,
532  (PVIDEO_MODE_INFORMATION *) &VideoModeInformation,
533  &ModeSize);
534 
535  if (NumModes == 0)
536  return 0;
537 
538  if (DM == NULL)
539  {
540  OutputSize = NumModes * (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
541  }
542  else
543  {
544  OutputSize=0;
545  VideoTemp = VideoModeInformation;
546 
547  do
548  {
549  if (VideoTemp->Length != 0)
550  {
551  if (OutputModes == 0)
552  break;
553 
554  memset(DM, 0, sizeof(DEVMODEW));
555  memcpy(DM->dmDeviceName, DLL_NAME, sizeof(DLL_NAME));
556 
557  DM->dmSpecVersion = DM_SPECVERSION;
558  DM->dmDriverVersion = DM_SPECVERSION;
559  DM->dmSize = sizeof(DEVMODEW);
560  DM->dmDriverExtra = DRIVER_EXTRA_SIZE;
561  DM->dmBitsPerPel = VideoTemp->NumberOfPlanes *
562  VideoTemp->BitsPerPlane;
563  DM->dmPelsWidth = VideoTemp->VisScreenWidth;
564  DM->dmPelsHeight = VideoTemp->VisScreenHeight;
565  DM->dmDisplayFrequency = VideoTemp->Frequency;
566  DM->dmDisplayFlags = 0;
567 
568  DM->dmFields = DM_BITSPERPEL |
569  DM_PELSWIDTH |
570  DM_PELSHEIGHT |
573 
574  /* next DEVMODE entry */
575  OutputModes--;
576 
577  DM = (PDEVMODEW) ( ((ULONG_PTR)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
578 
579  OutputSize += (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
580  }
581 
582  VideoTemp = (PVIDEO_MODE_INFORMATION)(((PUCHAR)VideoTemp) + ModeSize);
583 
584  } while (--NumModes);
585  }
586  return OutputSize;
587 }
struct _devicemodeW * PDEVMODEW
#define DRIVER_EXTRA_SIZE
Definition: driver.h:71
unsigned char * PUCHAR
Definition: retypes.h:3
#define DLL_NAME
Definition: driver.h:73
#define DM_PELSWIDTH
Definition: wingdi.h:1268
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct _VIDEO_MODE_INFORMATION * PVIDEO_MODE_INFORMATION
smooth NULL
Definition: ftsmooth.c:416
_In_ PCUNICODE_STRING _In_ PVOID Driver
Definition: cmfuncs.h:32
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DM_SPECVERSION
Definition: wingdi.h:1242
DWORD NTAPI getAvailableModes(HANDLE, PVIDEO_MODE_INFORMATION *, DWORD *)
Definition: screen.c:507
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1271
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define DM_PELSHEIGHT
Definition: wingdi.h:1269
#define DM
Definition: ftp_var.h:26
#define DM_BITSPERPEL
Definition: wingdi.h:1267
struct _devicemodeW DEVMODEW
#define memset(x, y, z)
Definition: compat.h:39
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
#define DM_DISPLAYFLAGS
Definition: wingdi.h:1270

◆ InitSavedBits()

static VOID InitSavedBits ( IN PPDEV  ppdev)
static

Definition at line 394 of file enable.c.

395 {
396  if (!(ppdev->fl & DRIVER_OFFSCREEN_REFRESHED))
397  return;
398 
399  /* set up rect to right of visible screen */
400  ppdev->SavedBitsRight.left = ppdev->sizeSurf.cx;
401  ppdev->SavedBitsRight.top = 0;
402  ppdev->SavedBitsRight.right = ppdev->sizeMem.cx - PLANAR_PELS_PER_CPU_ADDRESS;
403  ppdev->SavedBitsRight.bottom = ppdev->sizeSurf.cy;
404 
405  if ((ppdev->SavedBitsRight.right <= ppdev->SavedBitsRight.left) ||
406  (ppdev->SavedBitsRight.bottom <= ppdev->SavedBitsRight.top))
407  {
408  ppdev->SavedBitsRight.left = 0;
409  ppdev->SavedBitsRight.top = 0;
410  ppdev->SavedBitsRight.right = 0;
411  ppdev->SavedBitsRight.bottom = 0;
412  }
413 
414  /* set up rect below visible screen */
415  ppdev->SavedBitsBottom.left = 0;
416  ppdev->SavedBitsBottom.top = ppdev->sizeSurf.cy;
417  ppdev->SavedBitsBottom.right = ppdev->sizeMem.cx - PLANAR_PELS_PER_CPU_ADDRESS;
418  ppdev->SavedBitsBottom.bottom = ppdev->sizeMem.cy - ppdev->NumScansUsedByPointer;
419 
420  if ((ppdev->SavedBitsBottom.right <= ppdev->SavedBitsBottom.left) ||
421  (ppdev->SavedBitsBottom.bottom <= ppdev->SavedBitsBottom.top))
422  {
423  ppdev->SavedBitsBottom.left = 0;
424  ppdev->SavedBitsBottom.top = 0;
425  ppdev->SavedBitsBottom.right = 0;
426  ppdev->SavedBitsBottom.bottom = 0;
427  }
428 
429  ppdev->BitsSaved = FALSE;
430 }
#define DRIVER_OFFSCREEN_REFRESHED
Definition: vgaddi.h:250
#define PLANAR_PELS_PER_CPU_ADDRESS
Definition: vgaddi.h:251

Referenced by DrvEnableSurface().

Variable Documentation

◆ devinfoVGA

DEVINFO devinfoVGA
Initial value:
=
{
),
0,
8,
8,
NULL,
0
}
#define GCAPS_ALTERNATEFILL
Definition: winddi.h:325
Definition: xlate.c:9
#define GCAPS_MONO_DITHER
Definition: winddi.h:333
#define HELVE_LOGFONT
Definition: enable.c:168
#define SYSTM_LOGFONT
Definition: enable.c:167
#define GCAPS_DITHERONREALIZE
Definition: winddi.h:342
#define GCAPS_COLOR_DITHER
Definition: winddi.h:328
#define GCAPS_WINDINGFILL
Definition: winddi.h:326
smooth NULL
Definition: ftsmooth.c:416
#define COURI_LOGFONT
Definition: enable.c:169
#define GCAPS_OPAQUERECT
Definition: winddi.h:331
#define GCAPS_HORIZSTRIKE
Definition: winddi.h:329

Definition at line 171 of file enable.c.

Referenced by DrvEnablePDEV().

◆ FuncList

DRVFN FuncList[]
static

Definition at line 13 of file enable.c.

Referenced by DrvEnableDriver().

◆ gaulCap

GDIINFO gaulCap
static

Definition at line 58 of file enable.c.

Referenced by DrvEnablePDEV().

◆ VGAInitialized

BOOL VGAInitialized = FALSE
static

Definition at line 11 of file enable.c.

Referenced by DrvAssertMode(), and DrvEnableSurface().

◆ VGApalette

const VGALOGPALETTE VGApalette
Initial value:
=
{
0x400,
16,
{
{ 0x00, 0x00, 0x00, 0x00 },
{ 0x80, 0x00, 0x00, 0x00 },
{ 0x00, 0x80, 0x00, 0x00 },
{ 0x80, 0x80, 0x00, 0x00 },
{ 0x00, 0x00, 0x80, 0x00 },
{ 0x80, 0x00, 0x80, 0x00 },
{ 0x00, 0x80, 0x80, 0x00 },
{ 0x80, 0x80, 0x80, 0x00 },
{ 0xc0, 0xc0, 0xc0, 0x00 },
{ 0xff, 0x00, 0x00, 0x00 },
{ 0x00, 0xff, 0x00, 0x00 },
{ 0xff, 0xff, 0x00, 0x00 },
{ 0x00, 0x00, 0xff, 0x00 },
{ 0xff, 0x00, 0xff, 0x00 },
{ 0x00, 0xff, 0xff, 0x00 },
{ 0xff, 0xff, 0xff, 0x00 }
}
}

Definition at line 140 of file enable.c.

Referenced by DrvEnablePDEV().