246
* Call the wrapped CloseScreen function.
248
* Free our resources and private structures.
252
winCloseScreenPrimaryDD (int nIndex, ScreenPtr pScreen)
237
winFreeFBPrimaryDD (ScreenPtr pScreen)
254
239
winScreenPriv(pScreen);
255
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
258
ErrorF ("winCloseScreenPrimaryDD - Freeing screen resources\n");
260
/* Flag that the screen is closed */
261
pScreenPriv->fClosed = TRUE;
262
pScreenPriv->fActive = FALSE;
264
/* Call the wrapped CloseScreen procedure */
265
WIN_UNWRAP(CloseScreen);
266
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
268
/* Delete the window property */
269
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
240
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
271
242
/* Free the offscreen surface, if there is one */
272
243
if (pScreenPriv->pddsOffscreen)
292
263
pScreenPriv->pdd = NULL;
266
/* Invalidate the ScreenInfo's fb pointer */
267
pScreenInfo->pfb = NULL;
271
winInitScreenPrimaryDD(ScreenPtr pScreen)
273
return winAllocateFBPrimaryDD(pScreen);
277
* Call the wrapped CloseScreen function.
279
* Free our resources and private structures.
283
winCloseScreenPrimaryDD (int nIndex, ScreenPtr pScreen)
285
winScreenPriv(pScreen);
286
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
289
ErrorF ("winCloseScreenPrimaryDD - Freeing screen resources\n");
291
/* Flag that the screen is closed */
292
pScreenPriv->fClosed = TRUE;
293
pScreenPriv->fActive = FALSE;
295
/* Call the wrapped CloseScreen procedure */
296
WIN_UNWRAP(CloseScreen);
297
fReturn = (*pScreen->CloseScreen) (nIndex, pScreen);
299
/* Delete the window property */
300
RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
302
winFreeFBPrimaryDD(pScreen);
295
304
/* Delete tray icon, if we have one */
296
305
if (!pScreenInfo->fNoTrayIcon)
297
306
winDeleteNotifyIcon (pScreenPriv);
313
322
/* Kill our screeninfo's pointer to the screen */
314
323
pScreenInfo->pScreen = NULL;
316
/* Invalidate the ScreenInfo's fb pointer */
317
pScreenInfo->pfb = NULL;
319
325
/* Free the screen privates for this screen */
320
326
free ((pointer) pScreenPriv);
430
436
dwBPP = GetDeviceCaps (hdc, BITSPIXEL);
432
438
/* DirectDraw can only change the depth in fullscreen mode */
433
if (pScreenInfo->dwBPP == WIN_DEFAULT_BPP)
435
/* No -depth parameter passed, let the user know the depth being used */
436
ErrorF ("winAdjustVideoModePrimaryDD - Using Windows display "
437
"depth of %d bits per pixel\n", (int) dwBPP);
439
/* Use GDI's depth */
440
pScreenInfo->dwBPP = dwBPP;
442
else if (pScreenInfo->fFullScreen
443
&& pScreenInfo->dwBPP != dwBPP)
445
/* FullScreen, and GDI depth differs from -depth parameter */
446
ErrorF ("winAdjustVideoModePrimaryDD - FullScreen, using command "
447
"line depth: %d\n", (int) pScreenInfo->dwBPP);
449
else if (dwBPP != pScreenInfo->dwBPP)
451
/* Windowed, and GDI depth differs from -depth parameter */
452
ErrorF ("winAdjustVideoModePrimaryDD - Windowed, command line "
453
"depth: %d, using depth: %d\n",
454
(int) pScreenInfo->dwBPP, (int) dwBPP);
456
/* We'll use GDI's depth */
457
pScreenInfo->dwBPP = dwBPP;
439
if (!(pScreenInfo->fFullScreen &&
440
(pScreenInfo->dwBPP != WIN_DEFAULT_BPP)))
442
/* Otherwise, We'll use GDI's depth */
443
pScreenInfo->dwBPP = dwBPP;
460
446
/* Release our DC */
461
447
ReleaseDC (NULL, hdc);
662
648
/* Set our pointers */
663
649
pScreenPriv->pwinAllocateFB = winAllocateFBPrimaryDD;
664
pScreenPriv->pwinShadowUpdate
665
= (winShadowUpdateProcPtr) (void (*)(void))NoopDDA;
650
pScreenPriv->pwinFreeFB = winFreeFBPrimaryDD;
651
pScreenPriv->pwinShadowUpdate = (winShadowUpdateProcPtr) (void (*)(void))NoopDDA;
652
pScreenPriv->pwinInitScreen = winInitScreenPrimaryDD;
666
653
pScreenPriv->pwinCloseScreen = winCloseScreenPrimaryDD;
667
654
pScreenPriv->pwinInitVisuals = winInitVisualsPrimaryDD;
668
655
pScreenPriv->pwinAdjustVideoMode = winAdjustVideoModePrimaryDD;
672
659
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
673
660
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
674
pScreenPriv->pwinBltExposedRegions
675
= (winBltExposedRegionsProcPtr) (void (*)(void))NoopDDA;
661
pScreenPriv->pwinBltExposedRegions = (winBltExposedRegionsProcPtr) (void (*)(void))NoopDDA;
676
662
pScreenPriv->pwinActivateApp = winActivateAppPrimaryDD;
663
pScreenPriv->pwinRedrawScreen = NULL;
664
pScreenPriv->pwinRealizeInstalledPalette = NULL;
665
pScreenPriv->pwinInstallColormap = NULL;
666
pScreenPriv->pwinStoreColors = NULL;
667
pScreenPriv->pwinCreateColormap = NULL;
668
pScreenPriv->pwinDestroyColormap = NULL;
677
669
pScreenPriv->pwinHotKeyAltTab = winHotKeyAltTabPrimaryDD;
670
pScreenPriv->pwinCreatePrimarySurface = (winCreatePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
671
pScreenPriv->pwinReleasePrimarySurface = (winReleasePrimarySurfaceProcPtr) (void (*)(void))NoopDDA;
678
672
#ifdef XWIN_MULTIWINDOW
679
673
pScreenPriv->pwinFinishCreateWindowsWindow =
680
674
(winFinishCreateWindowsWindowProcPtr) (void (*)(void))NoopDDA;