xwin: call winFinishScreenInitFB() directly
Both engines, GDI as well as DirectDraw, using the same screen init finish function, so no need to keep indirection via per-engine callback pointer. The winFinishScreenInitFB() can also be made static now. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
7cbb183721
commit
dce437bb53
|
@ -485,7 +485,6 @@ typedef struct _winPrivScreenRec {
|
|||
winInitVisualsProcPtr pwinInitVisuals;
|
||||
winAdjustVideoModeProcPtr pwinAdjustVideoMode;
|
||||
winCreateBoundingWindowProcPtr pwinCreateBoundingWindow;
|
||||
winFinishScreenInitProcPtr pwinFinishScreenInit;
|
||||
winBltExposedRegionsProcPtr pwinBltExposedRegions;
|
||||
winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion;
|
||||
winActivateAppProcPtr pwinActivateApp;
|
||||
|
@ -827,9 +826,6 @@ void
|
|||
Bool
|
||||
winScreenInit(ScreenPtr pScreen, int argc, char **argv);
|
||||
|
||||
Bool
|
||||
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
|
||||
|
||||
/*
|
||||
* winshadddnl.c
|
||||
*/
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#include "win.h"
|
||||
#include "winmsg.h"
|
||||
|
||||
static Bool winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv);
|
||||
|
||||
/*
|
||||
* Determine what type of screen we are initializing
|
||||
* and call the appropriate procedure to initialize
|
||||
|
@ -165,9 +167,8 @@ winScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
|||
/* Clear the visuals list */
|
||||
miClearVisualTypes();
|
||||
|
||||
/* Call the engine dependent screen initialization procedure */
|
||||
if (!((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) {
|
||||
ErrorF("winScreenInit - winFinishScreenInit () failed\n");
|
||||
if (!winFinishScreenInitFB(pScreen->myNum, pScreen, argc, argv)) {
|
||||
ErrorF("%s(): winFinishScreenInitFB () failed\n", __FUNCTION__);
|
||||
|
||||
/* call the engine dependent screen close procedure to clean up from a failure */
|
||||
pScreenPriv->pwinCloseScreen(pScreen);
|
||||
|
@ -221,7 +222,7 @@ winCreateScreenResources(ScreenPtr pScreen)
|
|||
}
|
||||
|
||||
/* See Porting Layer Definition - p. 20 */
|
||||
Bool
|
||||
static Bool
|
||||
winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv)
|
||||
{
|
||||
winScreenPriv(pScreen);
|
||||
|
|
|
@ -1193,7 +1193,6 @@ winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen)
|
|||
winCreateBoundingWindowFullScreen;
|
||||
else
|
||||
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
|
||||
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
|
||||
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL;
|
||||
pScreenPriv->pwinBltExposedWindowRegion = NULL;
|
||||
pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL;
|
||||
|
|
|
@ -1265,7 +1265,6 @@ winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
|
|||
winCreateBoundingWindowFullScreen;
|
||||
else
|
||||
pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
|
||||
pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
|
||||
pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI;
|
||||
pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI;
|
||||
pScreenPriv->pwinActivateApp = winActivateAppShadowGDI;
|
||||
|
|
Loading…
Reference in New Issue