void OsVendorInit (void) { /* Re-initialize global variables on server reset */ winInitializeGlobals (); winFixupPaths(); #ifdef DDXOSVERRORF if (!OsVendorVErrorFProc) OsVendorVErrorFProc = OsVendorVErrorF; #endif if (!g_fLogInited) { /* keep this order. If LogInit fails it calls Abort which then calls * ddxGiveUp where LogInit is called again and creates an infinite * recursion. If we set g_fLogInited to TRUE before the init we * avoid the second call */ g_fLogInited = TRUE; g_pszLogFile = LogInit (g_pszLogFile, NULL); } LogSetParameter (XLOG_FLUSH, 1); LogSetParameter (XLOG_VERBOSITY, g_iLogVerbose); LogSetParameter (XLOG_FILE_VERBOSITY, g_iLogVerbose); /* Log the version information */ if (serverGeneration == 1) winLogVersionInfo (); winCheckMount(); /* Add a default screen if no screens were specified */ if (g_iNumScreens == 0) { winDebug ("OsVendorInit - Creating default screen 0\n"); /* * We need to initialize the default screen 0 if no -screen * arguments were processed. * * Add a screen 0 using the defaults set by winInitializeDefaultScreens() * and any additional default screen parameters given */ winInitializeScreens(1); /* We have to flag this as an explicit screen, even though it isn't */ g_ScreenInfo[0].fExplicitScreen = TRUE; } }
int main(int argc, char *argv[], char *envp[]) { int iReturn; /* Create & acquire the termination mutex */ iReturn = pthread_mutex_init(&g_pmTerminating, NULL); if (iReturn != 0) { ErrorF("ddxMain - pthread_mutex_init () failed: %d\n", iReturn); } iReturn = pthread_mutex_lock(&g_pmTerminating); if (iReturn != 0) { ErrorF("ddxMain - pthread_mutex_lock () failed: %d\n", iReturn); } winCheckMount(); return dix_main(argc, argv, envp); }
void OsVendorInit(void) { /* Re-initialize global variables on server reset */ winInitializeGlobals(); winFixupPaths(); #ifdef DDXOSVERRORF if (!OsVendorVErrorFProc) OsVendorVErrorFProc = OsVendorVErrorF; #endif if (!g_fLogInited) { /* keep this order. If LogInit fails it calls Abort which then calls * ddxGiveUp where LogInit is called again and creates an infinite * recursion. If we set g_fLogInited to TRUE before the init we * avoid the second call */ g_fLogInited = TRUE; g_pszLogFile = LogInit(g_pszLogFile, NULL); } LogSetParameter(XLOG_FLUSH, 1); LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose); LogSetParameter(XLOG_FILE_VERBOSITY, g_iLogVerbose); /* Log the version information */ if (serverGeneration == 1) winLogVersionInfo(); winCheckMount(); /* Add a default screen if no screens were specified */ if (g_iNumScreens == 0) { winDebug("OsVendorInit - Creating default screen 0\n"); /* * We need to initialize the default screen 0 if no -screen * arguments were processed. * * Add a screen 0 using the defaults set by winInitializeDefaultScreens() * and any additional default screen parameters given */ winInitializeScreens(1); /* We have to flag this as an explicit screen, even though it isn't */ g_ScreenInfo[0].fExplicitScreen = TRUE; } /* Work out what the default emulate3buttons setting should be, and apply it if nothing was explicitly specified */ { int mouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); int j; for (j = 0; j < g_iNumScreens; j++) { if (g_ScreenInfo[j].iE3BTimeout == WIN_E3B_DEFAULT) { if (mouseButtons < 3) { static Bool reportOnce = TRUE; g_ScreenInfo[j].iE3BTimeout = WIN_DEFAULT_E3B_TIME; if (reportOnce) { reportOnce = FALSE; winMsg(X_PROBED, "Windows reports only %d mouse buttons, defaulting to -emulate3buttons\n", mouseButtons); } } else { g_ScreenInfo[j].iE3BTimeout = WIN_E3B_OFF; } } } } }