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