72574f4ab568ca2ca6d658514646f97ad9f37d9c
[reactos.git] / reactos / drivers / video / displays / vga / main / enable.c
1 /*
2 * entry.c
3 *
4 * $Revision: 1.3 $
5 * $Author: dwelch $
6 * $Date: 2004/03/16 21:11:44 $
7 *
8 */
9
10 #include "../vgaddi.h"
11 #include "../vgavideo/vgavideo.h"
12 #define NDEBUG
13 #include <debug.h>
14
15 #define DBG_PREFIX "VGADDI: "
16
17 static BOOL VGAInitialized = FALSE;
18
19 DRVFN FuncList[] =
20 {
21 /* Required Display driver fuctions */
22 {INDEX_DrvAssertMode, (PFN) DrvAssertMode},
23 {INDEX_DrvCompletePDEV, (PFN) DrvCompletePDEV},
24 {INDEX_DrvCopyBits, (PFN) DrvCopyBits},
25 {INDEX_DrvDisablePDEV, (PFN) DrvDisablePDEV},
26 {INDEX_DrvDisableSurface, (PFN) DrvDisableSurface},
27 {INDEX_DrvEnablePDEV, (PFN) DrvEnablePDEV},
28 {INDEX_DrvEnableSurface, (PFN) DrvEnableSurface},
29 {INDEX_DrvGetModes, (PFN) DrvGetModes},
30 {INDEX_DrvLineTo, (PFN) DrvLineTo},
31 {INDEX_DrvPaint, (PFN) DrvPaint},
32 {INDEX_DrvBitBlt, (PFN) DrvBitBlt},
33 {INDEX_DrvTransparentBlt, (PFN) DrvTransparentBlt},
34 {INDEX_DrvMovePointer, (PFN) DrvMovePointer},
35 {INDEX_DrvSetPointerShape, (PFN) DrvSetPointerShape},
36
37 #if 0
38 /* Optional Display driver functions */
39 {INDEX_, (PFN) },
40 {INDEX_DescribePixelFormat, (PFN) VGADDIDescribePixelFormat},
41 {INDEX_DrvDitherColor, (PFN) VGADDIDitherColor},
42 {INDEX_DrvFillPath, (PFN) VGADDIFillPath},
43 {INDEX_DrvGetTrueTypeFile, (PFN) VGADDIGetTrueTypeFile},
44 {INDEX_DrvLoadFontFile, (PFN) VGADDILoadFontFile},
45 {INDEX_DrvQueryFont, (PFN) VGADDIQueryFont},
46 {INDEX_DrvQueryFontCaps, (PFN) VGADDIQueryFontCaps},
47 {INDEX_DrvQueryFontData, (PFN) VGADDIQueryFontData},
48 {INDEX_DrvQueryFontFile, (PFN) VGADDIQueryFontFile},
49 {INDEX_DrvQueryFontTree, (PFN) VGADDIQueryFontTree},
50 {INDEX_DrvQueryTrueTypeOutline, (PFN) VGADDIQueryTrueTypeOutline},
51 {INDEX_DrvQueryTrueTypeTable, (PFN) VGADDIQueryTrueTypeTable},
52 {INDEX_DrvRealizeBrush, (PFN) VGADDIRealizeBrush},
53 {INDEX_DrvResetPDEV, (PFN) VGADDIResetPDEV},
54 {INDEX_DrvSetPalette, (PFN) VGADDISetPalette},
55 {INDEX_DrvSetPixelFormat, (PFN) VGADDISetPixelFormat},
56 {INDEX_DrvStretchBlt, (PFN) VGADDIStretchBlt},
57 {INDEX_DrvStrokePath, (PFN) VGADDIStrokePath},
58 {INDEX_DrvSwapBuffers, (PFN) VGADDISwapBuffers},
59 {INDEX_DrvTextOut, (PFN) VGADDITextOut},
60 {INDEX_DrvUnloadFontFile, (PFN) VGADDIUnloadFontFile},
61 #endif
62 };
63
64 GDIINFO gaulCap = {
65 GDI_DRIVER_VERSION,
66 DT_RASDISPLAY, // ulTechnology
67 0, // ulHorzSize
68 0, // ulVertSize
69 0, // ulHorzRes (filled in at initialization)
70 0, // ulVertRes (filled in at initialization)
71 4, // cBitsPixel
72 1, // cPlanes
73 16, // ulNumColors
74 0, // flRaster (DDI reserved field)
75
76 96, // ulLogPixelsX (must be set to 96 according to MSDN)
77 96, // ulLogPixelsY (must be set to 96 according to MSDN)
78
79 TC_RA_ABLE | TC_SCROLLBLT, // flTextCaps
80
81 6, // ulDACRed
82 6, // ulDACGree
83 6, // ulDACBlue
84
85 0x0024, // ulAspectX (one-to-one aspect ratio)
86 0x0024, // ulAspectY
87 0x0033, // ulAspectXY
88
89 1, // xStyleStep
90 1, // yStyleSte;
91 3, // denStyleStep
92
93 { 0, 0 }, // ptlPhysOffset
94 { 0, 0 }, // szlPhysSize
95
96 0, // ulNumPalReg (win3.1 16 color drivers say 0 too)
97
98 // These fields are for halftone initialization.
99
100 { // ciDevice, ColorInfo
101 { 6700, 3300, 0 }, // Red
102 { 2100, 7100, 0 }, // Green
103 { 1400, 800, 0 }, // Blue
104 { 1750, 3950, 0 }, // Cyan
105 { 4050, 2050, 0 }, // Magenta
106 { 4400, 5200, 0 }, // Yellow
107 { 3127, 3290, 0 }, // AlignmentWhite
108 20000, // RedGamma
109 20000, // GreenGamma
110 20000, // BlueGamma
111 0, 0, 0, 0, 0, 0
112 },
113
114 0, // ulDevicePelsDPI
115 PRIMARY_ORDER_CBA, // ulPrimaryOrder
116 HT_PATSIZE_4x4_M, // ulHTPatternSize
117 HT_FORMAT_4BPP_IRGB, // ulHTOutputFormat
118 HT_FLAG_ADDITIVE_PRIMS, // flHTFlags
119
120 0, // ulVRefresh
121 8, // ulBltAlignment
122 0, // ulPanningHorzRes
123 0, // ulPanningVertRes
124 };
125
126 // Palette for VGA
127
128 typedef struct _VGALOGPALETTE
129 {
130 USHORT ident;
131 USHORT NumEntries;
132 PALETTEENTRY PaletteEntry[16];
133 } VGALOGPALETTE;
134
135 const VGALOGPALETTE VGApalette =
136 {
137
138 0x400, // driver version
139 16, // num entries
140 {
141 { 0x00, 0x00, 0x00, 0x00 }, // 0
142 { 0x80, 0x00, 0x00, 0x00 }, // 1
143 { 0x00, 0x80, 0x00, 0x00 }, // 2
144 { 0x80, 0x80, 0x00, 0x00 }, // 3
145 { 0x00, 0x00, 0x80, 0x00 }, // 4
146 { 0x80, 0x00, 0x80, 0x00 }, // 5
147 { 0x00, 0x80, 0x80, 0x00 }, // 6
148 { 0x80, 0x80, 0x80, 0x00 }, // 7
149 { 0xc0, 0xc0, 0xc0, 0x00 }, // 8
150 { 0xff, 0x00, 0x00, 0x00 }, // 9
151 { 0x00, 0xff, 0x00, 0x00 }, // 10
152 { 0xff, 0xff, 0x00, 0x00 }, // 11
153 { 0x00, 0x00, 0xff, 0x00 }, // 12
154 { 0xff, 0x00, 0xff, 0x00 }, // 13
155 { 0x00, 0xff, 0xff, 0x00 }, // 14
156 { 0xff, 0xff, 0xff, 0x00 } // 15
157 }
158 };
159
160 // Devinfo structure passed back to the engine in DrvEnablePDEV
161
162 #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"}
163 #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"}
164 #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"}
165
166 DEVINFO devinfoVGA =
167 {
168 (GCAPS_OPAQUERECT | GCAPS_HORIZSTRIKE | GCAPS_ALTERNATEFILL | GCAPS_MONO_DITHER | GCAPS_COLOR_DITHER |
169 GCAPS_WINDINGFILL | GCAPS_DITHERONREALIZE
170 ), // Graphics capabilities
171
172 SYSTM_LOGFONT, // Default font description
173 HELVE_LOGFONT, // ANSI variable font description
174 COURI_LOGFONT, // ANSI fixed font description
175 0, // Count of device fonts
176 BMF_4BPP, // preferred DIB format
177 8, // Width of color dither
178 8, // Height of color dither
179 0 // Default palette to use for this device
180 };
181
182
183 BOOL STDCALL
184 DrvEnableDriver(IN ULONG EngineVersion,
185 IN ULONG SizeOfDED,
186 OUT PDRVENABLEDATA DriveEnableData)
187 {
188 /* EngDebugPrint("VGADDI", "DrvEnableDriver called...\n", 0); */
189
190 vgaPreCalc();
191
192 VGADDI_InitializeOffScreenMem((640 * 480) >> 3, 65536 - ((640 * 480) >> 3));
193
194 DriveEnableData->pdrvfn = FuncList;
195 DriveEnableData->c = sizeof(FuncList) / sizeof(DRVFN);
196 DriveEnableData->iDriverVersion = DDI_DRIVER_VERSION_NT4;
197
198 return TRUE;
199 }
200
201 // DrvDisableDriver
202 // DESCRIPTION:
203 // This function is called by the KMGDI at exit. It should cleanup.
204 // ARGUMENTS:
205 // NONE
206 // RETURNS:
207 // NONE
208
209 VOID STDCALL
210 DrvDisableDriver(VOID)
211 {
212 return;
213 }
214
215 // ----------------------------------------------- Driver Implementation
216
217
218 // DrvEnablePDEV
219 // DESCRIPTION:
220 // This function is called after DrvEnableDriver to get information
221 // about the mode that is to be used. This function just returns
222 // information, and should not yet initialize the mode.
223 // ARGUMENTS:
224 // IN DEVMODEW * DM Describes the mode requested
225 // IN LPWSTR LogAddress
226 // IN ULONG PatternCount number of patterns expected
227 // OUT HSURF * SurfPatterns array to contain pattern handles
228 // IN ULONG GDIInfoSize the size of the GDIInfo object passed in
229 // OUT ULONG * GDIInfo GDI Info object
230 // IN ULONG DevInfoSize the size of the DevInfo object passed in
231 // OUT ULONG * DevInfo Device Info object
232 // IN LPWSTR DevDataFile ignore
233 // IN LPWSTR DeviceName Device name
234 // IN HANDLE Driver handle to KM driver
235 // RETURNS:
236 // DHPDEV a handle to a DPev object
237
238 DHPDEV STDCALL
239 DrvEnablePDEV(IN DEVMODEW *DM,
240 IN LPWSTR LogAddress,
241 IN ULONG PatternCount,
242 OUT HSURF *SurfPatterns,
243 IN ULONG GDIInfoSize,
244 OUT ULONG *GDIInfo,
245 IN ULONG DevInfoSize,
246 OUT DEVINFO *DevInfo,
247 IN HDEV Dev,
248 IN LPWSTR DeviceName,
249 IN HANDLE Driver)
250 {
251 PPDEV PDev;
252
253 PDev = EngAllocMem(FL_ZERO_MEMORY, sizeof(PDEV), ALLOC_TAG);
254 if (PDev == NULL)
255 {
256 EngDebugPrint(DBG_PREFIX, "EngAllocMem failed for PDEV\n", 0);
257 return(NULL);
258 }
259 PDev->KMDriver = Driver;
260 DPRINT( "PDev: %x, Driver: %x\n", PDev, PDev->KMDriver );
261 PDev->xyCursor.x = 320;
262 PDev->xyCursor.y = 240;
263 PDev->ptlExtent.x = 0;
264 PDev->ptlExtent.y = 0;
265 PDev->cExtent = 0;
266 PDev->flCursor = CURSOR_DOWN;
267
268 gaulCap.ulHorzRes = 640;
269 gaulCap.ulVertRes = 480;
270 if (sizeof(GDIINFO) < GDIInfoSize)
271 {
272 GDIInfoSize = sizeof(GDIINFO);
273 }
274 memcpy(GDIInfo, &gaulCap, GDIInfoSize);
275
276 devinfoVGA.hpalDefault = EngCreatePalette(PAL_INDEXED, 16, (ULONG *) VGApalette.PaletteEntry, 0, 0, 0);
277 if (sizeof(DEVINFO) < DevInfoSize)
278 {
279 DevInfoSize = sizeof(DEVINFO);
280 }
281 memcpy(DevInfo, &devinfoVGA, DevInfoSize);
282
283 return (DHPDEV) PDev;
284 }
285
286
287 // DrvCompletePDEV
288 // DESCRIPTION
289 // Called after initialization of PDEV is complete. Supplies
290 // a reference to the GDI handle for the PDEV.
291
292 VOID STDCALL
293 DrvCompletePDEV(IN DHPDEV PDev,
294 IN HDEV Dev)
295 {
296 ((PPDEV) PDev)->GDIDevHandle = Dev; // Handle to the DC
297 }
298
299
300 BOOL STDCALL
301 DrvAssertMode(IN DHPDEV DPev,
302 IN BOOL Enable)
303 {
304 PPDEV ppdev = (PPDEV)DPev;
305 ULONG returnedDataLength;
306
307 if(Enable==TRUE)
308 {
309 // Reenable our graphics mode
310
311 if (!InitPointer(ppdev))
312 {
313 // Failed to set pointer
314 return FALSE;
315 }
316
317 if (!VGAInitialized)
318 {
319 if (!InitVGA(ppdev, FALSE))
320 {
321 // Failed to initialize the VGA
322 return FALSE;
323 }
324 VGAInitialized = TRUE;
325 }
326 } else {
327 // Go back to last known mode
328 DPRINT( "ppdev: %x, KMDriver: %x", ppdev, ppdev->KMDriver );
329 if (EngDeviceIoControl(ppdev->KMDriver, IOCTL_VIDEO_RESET_DEVICE, NULL, 0, NULL, 0, &returnedDataLength))
330 {
331 // Failed to go back to mode
332 return FALSE;
333 }
334 VGAInitialized = FALSE;
335 }
336 return TRUE;
337 }
338
339
340 VOID STDCALL
341 DrvDisablePDEV(IN DHPDEV PDev)
342 {
343 PPDEV ppdev = (PPDEV)PDev;
344
345 // EngDeletePalette(devinfoVGA.hpalDefault);
346 if (ppdev->pjPreallocSSBBuffer != NULL)
347 {
348 EngFreeMem(ppdev->pjPreallocSSBBuffer);
349 }
350
351 if (ppdev->pucDIB4ToVGAConvBuffer != NULL)
352 {
353 EngFreeMem(ppdev->pucDIB4ToVGAConvBuffer);
354 }
355 DPRINT( "Freeing PDEV\n" );
356 EngFreeMem(PDev);
357 }
358
359
360 VOID STDCALL
361 DrvDisableSurface(IN DHPDEV PDev)
362 {
363 PPDEV ppdev = (PPDEV)PDev;
364 PDEVSURF pdsurf = ppdev->AssociatedSurf;
365 CHECKPOINT;
366 DPRINT( "KMDriver: %x\n", ppdev->KMDriver );
367 DeinitVGA(ppdev);
368 // EngFreeMem(pdsurf->BankSelectInfo);
369 CHECKPOINT;
370 if (pdsurf->BankInfo != NULL) {
371 EngFreeMem(pdsurf->BankInfo);
372 }
373 CHECKPOINT;
374 if (pdsurf->BankInfo2RW != NULL) {
375 EngFreeMem(pdsurf->BankInfo2RW);
376 }
377 CHECKPOINT;
378 if (pdsurf->BankBufferPlane0 != NULL) {
379 EngFreeMem(pdsurf->BankBufferPlane0);
380 }
381 CHECKPOINT;
382 if (ppdev->pPointerAttributes != NULL) {
383 EngFreeMem(ppdev->pPointerAttributes);
384 }
385 CHECKPOINT;
386 // free any pending saved screen bit blocks
387 #if 0
388 pSSB = pdsurf->ssbList;
389 while (pSSB != (PSAVED_SCREEN_BITS) NULL) {
390
391 // Point to the next saved screen bits block
392 pSSBNext = (PSAVED_SCREEN_BITS) pSSB->pvNextSSB;
393
394 // Free the current block
395 EngFreeMem(pSSB);
396 pSSB = pSSBNext;
397 }
398 #endif
399 EngDeleteSurface((HSURF) ppdev->SurfHandle);
400 // EngFreeMem(pdsurf); // free the surface
401 }
402
403
404 static VOID
405 InitSavedBits(PPDEV ppdev)
406 {
407 if (!(ppdev->fl & DRIVER_OFFSCREEN_REFRESHED))
408 {
409 return;
410 }
411
412 // set up rect to right of visible screen
413 ppdev->SavedBitsRight.left = ppdev->sizeSurf.cx;
414 ppdev->SavedBitsRight.top = 0;
415 ppdev->SavedBitsRight.right = ppdev->sizeMem.cx-PLANAR_PELS_PER_CPU_ADDRESS;
416 ppdev->SavedBitsRight.bottom = ppdev->sizeSurf.cy;
417
418 if ((ppdev->SavedBitsRight.right <= ppdev->SavedBitsRight.left) ||
419 (ppdev->SavedBitsRight.bottom <= ppdev->SavedBitsRight.top))
420 {
421 ppdev->SavedBitsRight.left = 0;
422 ppdev->SavedBitsRight.top = 0;
423 ppdev->SavedBitsRight.right = 0;
424 ppdev->SavedBitsRight.bottom = 0;
425 }
426
427 // set up rect below visible screen
428 ppdev->SavedBitsBottom.left = 0;
429 ppdev->SavedBitsBottom.top = ppdev->sizeSurf.cy;
430 ppdev->SavedBitsBottom.right = ppdev->sizeMem.cx-PLANAR_PELS_PER_CPU_ADDRESS;
431 ppdev->SavedBitsBottom.bottom = ppdev->sizeMem.cy - ppdev->NumScansUsedByPointer;
432
433 if ((ppdev->SavedBitsBottom.right <= ppdev->SavedBitsBottom.left) ||
434 (ppdev->SavedBitsBottom.bottom <= ppdev->SavedBitsBottom.top))
435 {
436 ppdev->SavedBitsBottom.left = 0;
437 ppdev->SavedBitsBottom.top = 0;
438 ppdev->SavedBitsBottom.right = 0;
439 ppdev->SavedBitsBottom.bottom = 0;
440 }
441
442 ppdev->BitsSaved = FALSE;
443
444 return;
445 }
446
447
448 HSURF STDCALL
449 DrvEnableSurface(IN DHPDEV PDev)
450 {
451 PPDEV ppdev = (PPDEV)PDev;
452 PDEVSURF pdsurf;
453 DHSURF dhsurf;
454 HSURF hsurf;
455
456 DPRINT("DrvEnableSurface() called\n");
457
458 // Initialize the VGA
459 if (!VGAInitialized)
460 {
461 if (!InitVGA(ppdev, TRUE))
462 {
463 goto error_done;
464 }
465 VGAInitialized = TRUE;
466 }
467
468 // dhsurf is of type DEVSURF, which is the drivers specialized surface type
469 dhsurf = (DHSURF)EngAllocMem(0, sizeof(DEVSURF), ALLOC_TAG);
470 if (dhsurf == (DHSURF) 0)
471 {
472 goto error_done;
473 }
474
475 pdsurf = (PDEVSURF) dhsurf;
476 pdsurf->ident = DEVSURF_IDENT;
477 pdsurf->flSurf = 0;
478 pdsurf->Format = BMF_PHYSDEVICE;
479 pdsurf->jReserved1 = 0;
480 pdsurf->jReserved2 = 0;
481 pdsurf->ppdev = ppdev;
482 pdsurf->sizeSurf.cx = ppdev->sizeSurf.cx;
483 pdsurf->sizeSurf.cy = ppdev->sizeSurf.cy;
484 pdsurf->NextPlane = 0;
485 pdsurf->Scan0 = ppdev->fbScreen;
486 pdsurf->BitmapStart = ppdev->fbScreen;
487 pdsurf->StartBmp = ppdev->fbScreen;
488 pdsurf->BankInfo = NULL;
489 pdsurf->BankInfo2RW = NULL;
490 pdsurf->BankBufferPlane0 = NULL;
491
492 /* pdsurf->Conv = &ConvertBuffer[0]; */
493
494 if (!InitPointer(ppdev)) {
495 DbgPrint("DrvEnablePDEV failed bInitPointer\n");
496 goto error_clean;
497 }
498
499 /* if (!SetUpBanking(pdsurf, ppdev)) {
500 DISPDBG((0, "DrvEnablePDEV failed SetUpBanking\n"));
501 goto error_clean;
502 } BANKING CODE UNIMPLEMENTED */
503
504 if ((hsurf = EngCreateDeviceSurface(dhsurf, ppdev->sizeSurf, BMF_4BPP)) ==
505 (HSURF)0)
506 {
507 // Call to EngCreateDeviceSurface failed
508 EngDebugPrint("VGADDI:", "EngCreateDeviceSurface call failed\n", 0);
509 goto error_clean;
510 }
511
512 InitSavedBits(ppdev);
513
514 if (EngAssociateSurface(hsurf, ppdev->GDIDevHandle, HOOK_BITBLT | HOOK_PAINT | HOOK_LINETO | HOOK_COPYBITS |
515 HOOK_TRANSPARENTBLT))
516 {
517 /* EngDebugPrint("VGADDI:", "Successfully associated surface\n", 0); */
518 ppdev->SurfHandle = hsurf;
519 ppdev->AssociatedSurf = pdsurf;
520
521 // Set up an empty saved screen block list
522 pdsurf->ssbList = NULL;
523
524 return(hsurf);
525 }
526 DPRINT( "EngAssociateSurface() failed\n" );
527 EngDeleteSurface(hsurf);
528
529 error_clean:
530 EngFreeMem(dhsurf);
531
532 error_done:
533 return((HSURF)0);
534 }
535
536
537 ULONG STDCALL
538 DrvGetModes(IN HANDLE Driver,
539 IN ULONG DataSize,
540 OUT PDEVMODEW DM)
541 {
542 DWORD NumModes;
543 DWORD ModeSize;
544 DWORD OutputSize;
545 DWORD OutputModes = DataSize / (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
546 PVIDEO_MODE_INFORMATION VideoModeInformation, VideoTemp;
547
548 NumModes = getAvailableModes(Driver,
549 (PVIDEO_MODE_INFORMATION *) &VideoModeInformation,
550 &ModeSize);
551
552 if (NumModes == 0)
553 {
554 return 0;
555 }
556
557 if (DM == NULL)
558 {
559 OutputSize = NumModes * (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
560 } else {
561
562 OutputSize=0;
563 VideoTemp = VideoModeInformation;
564
565 do
566 {
567 if (VideoTemp->Length != 0)
568 {
569 if (OutputModes == 0)
570 {
571 break;
572 }
573
574 memset(DM, 0, sizeof(DEVMODEW));
575 memcpy(DM->dmDeviceName, DLL_NAME, sizeof(DLL_NAME));
576
577 DM->dmSpecVersion = DM_SPECVERSION;
578 DM->dmDriverVersion = DM_SPECVERSION;
579 DM->dmSize = sizeof(DEVMODEW);
580 DM->dmDriverExtra = DRIVER_EXTRA_SIZE;
581 DM->dmBitsPerPel = VideoTemp->NumberOfPlanes *
582 VideoTemp->BitsPerPlane;
583 DM->dmPelsWidth = VideoTemp->VisScreenWidth;
584 DM->dmPelsHeight = VideoTemp->VisScreenHeight;
585 DM->dmDisplayFrequency = VideoTemp->Frequency;
586 DM->dmDisplayFlags = 0;
587
588 DM->dmFields = DM_BITSPERPEL |
589 DM_PELSWIDTH |
590 DM_PELSHEIGHT |
591 DM_DISPLAYFREQUENCY |
592 DM_DISPLAYFLAGS ;
593
594 // next DEVMODE entry
595 OutputModes--;
596
597 DM = (PDEVMODEW) ( ((ULONG)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
598
599 OutputSize += (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
600 }
601
602 VideoTemp = (PVIDEO_MODE_INFORMATION)(((PUCHAR)VideoTemp) + ModeSize);
603
604 } while (--NumModes);
605 }
606 return OutputSize;
607 }
608
609 /* EOF */