//---------------------------------------------------------------------------// // Load // //---------------------------------------------------------------------------// bool CMGEffect::Load(CNodeFile::CNode *pNode) { // Load FX data m_FXClass = pNode->AttrAsString("fxclass"); m_FXDir = pNode->AsString ("fxdir"); m_FXFile = pNode->AsString ("fxfile"); m_FXName = pNode->AsString ("fxname", m_FXName); m_FileName = pNode->AsString ("filename", m_FileName); PushDir("Effects/" + m_FXDir); CVJEffect::TVJSnapshot Snapshot; m_ID = g_pAppMain->VJController()->FXLoad(m_FXClass, m_FXFile, &Snapshot); PopDir (); if (m_ID != -1) { // Load controls and snapshot LoadSnapshot (&Snapshot, m_Bitmap); CreateControls(); // Load vars, filters and its links LoadVars (pNode); LoadFilters(pNode); } return (m_ID != -1); }
void DeviceSource::UpdateSettings() { String strNewDevice = data->GetString(TEXT("audioDevice")); UINT64 newFrameInterval = data->GetInt(TEXT("frameInterval")); UINT newCX = data->GetInt(TEXT("resolutionWidth")); UINT newCY = data->GetInt(TEXT("resolutionHeight")); BOOL bNewCustom = data->GetInt(TEXT("customResolution")); UINT newPreferredType = data->GetInt(TEXT("usePreferredType")) != 0 ? data->GetInt(TEXT("preferredType")) : -1; UINT newSoundOutputType = data->GetInt(TEXT("soundOutputType")); if(renderCX != newCX || renderCY != newCY || frameInterval != newFrameInterval || newPreferredType != preferredOutputType || !strAudioDevice.CompareI(strNewDevice) || bNewCustom != bUseCustomResolution || newSoundOutputType != soundOutputType) { API->EnterSceneMutex(); bool bWasCapturing = bCapturing; if(bWasCapturing) Stop(); UnloadFilters(); LoadFilters(); if(bWasCapturing) Start(); API->LeaveSceneMutex(); } }
bool CFilterManager::HasActiveFilters(bool ignore_disabled /*=false*/) { if (!m_loaded) LoadFilters(); if (m_globalFilterSets.empty()) return false; wxASSERT(m_globalCurrentFilterSet < m_globalFilterSets.size()); if (m_filters_disabled && !ignore_disabled) return false; const CFilterSet& set = m_globalFilterSets[m_globalCurrentFilterSet]; for (unsigned int i = 0; i < m_globalFilters.size(); i++) { if (set.local[i]) return true; if (set.remote[i]) return true; } return false; }
CFilterManager::CFilterManager() { LoadFilters(); if (m_globalFilterSets.empty()) { CFilterSet set; set.local.resize(m_globalFilters.size(), false); set.remote.resize(m_globalFilters.size(), false); m_globalFilterSets.push_back(set); } }
CFilterManager::CFilterManager() { m_currentFilterSet = 0; LoadFilters(); CompileRegexes(); if (m_globalFilterSets.empty()) { CFilterSet set; set.local.resize(m_filters.size(), false); set.remote.resize(m_filters.size(), false); m_globalFilterSets.push_back(set); m_filterSets.push_back(set); } }
BOOL CExplorerXPApp::InitInstance() { InOut log (TEXT("CExplorerXPApp::InitInstance")); // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // Set this to include all the common control classes you want to use // in your application. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); AfxOleInit(); AfxEnableControlContainer(); InitContextMenuManager(); InitShellManager(); InitThemes(); COleMessageFilter *pfilter = AfxOleGetMessageFilter(); if (pfilter) { pfilter->EnableBusyDialog(FALSE); pfilter->EnableNotRespondingDialog(FALSE); } RegisterShellClipboardFormats (); /*HINSTANCE hInstance = LoadLibrary(_T("Bulgarian.dll")); if( hInstance ) { AfxSetResourceHandle( hInstance ); } */ InitSoftwareLogPath (); gOptions.Load (); gFolderStateMan.Load(); gGroupManager.Load (); dirs.Load(); // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; ParseCommandLine(cmdInfo); if ( !m_SingleInstance.Create( IDR_MAINFRAME, cmdInfo) ) return FALSE; // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. // Change the registry key under which our settings are stored. // TODO: You should modify this string to be something appropriate // such as the name of your company or organization. SetRegistryKey(_T("ExplorerXP")); LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application's document templates. Document templates // serve as the connection between documents, frame windows and views. CMultiDocTemplate* pDocTemplate; pDocTemplate = new CMultiDocTemplate( IDR_EXPLORTYPE, RUNTIME_CLASS(CExplorerXPDoc), RUNTIME_CLASS(CChildFrame), // custom MDI child frame RUNTIME_CLASS(CExplorerXPView)); AddDocTemplate(pDocTemplate); CMainFrame* pMainFrame = new CMainFrame; { InOut log2 (_T("Mainframe:Load")); // create main MDI Frame window if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; } m_pMainWnd = pMainFrame; // Dispatch commands specified on the command line // The main window has been initialized, so show and update it. pMainFrame->ShowWindow(m_nCmdShow); pMainFrame->UpdateWindow(); { InOut log2(_T("MainFrame->FillTree ")); // pMainFrame->FillTree (); } LoadFilters (); dirs.Start (); LoadDefaultTabs(); gShortcutManager.Initialize (); gShortcutManager.LoadAccel(IDR_MAINFRAME); if (!cmdInfo.m_strFileName.IsEmpty ()) { // //AfxMessageBox (cmdInfo.m_strFileName); if (cmdInfo.m_strFileName[cmdInfo.m_strFileName.GetLength() -1] == _T('\"')) cmdInfo.m_strFileName.Delete (cmdInfo.m_strFileName.GetLength() -1); OpenFolder (cmdInfo.m_strFileName); } pMainFrame->RepositionMDIChildsInitial (); return TRUE; }