// returns 1 if a profile was selected static int getProfile(TCHAR * szProfile, size_t cch) { getProfilePath(g_profileDir, SIZEOF(g_profileDir)); if (IsInsideRootDir(g_profileDir, true)) { if (WritePrivateProfileString(_T("Database"), _T("ProfileDir"), _T(""), mirandabootini)) getProfilePath(g_profileDir, SIZEOF(g_profileDir)); } getDefaultProfile(szProfile, cch, g_profileDir); getProfileCmdLine(szProfile, cch, g_profileDir); if (IsInsideRootDir(g_profileDir, true)) { MessageBox(NULL, _T("Profile cannot be placed into Miranda root folder.\n") _T("Please move Miranda profile to some other location."), _T("Miranda IM"), MB_ICONERROR | MB_OK); return 0; } if (getProfileAutoRun(szProfile)) return 1; PROFILEMANAGERDATA pd = {0}; if (getProfile1(szProfile, cch, g_profileDir, &pd.noProfiles)) return 1; pd.szProfile = szProfile; pd.szProfileDir = g_profileDir; return getProfileManager(&pd); }
glws::Drawable * createDrawable(void) { return glretrace::createDrawable(getDefaultProfile()); }
glws::Drawable * createPbuffer(int width, int height) { return createDrawableHelper(getDefaultProfile(), width, height, true); }
Context * createContext(Context *shareContext) { return createContext(shareContext, getDefaultProfile()); }
glws::Drawable * createDrawable(void) { return createDrawable(getDefaultProfile()); }