bool CMPCVideoDecCodecWnd::OnApply()
{
	OnDeactivate();

	if(m_pMDF)
	{
		int			nActiveCodecs = 0;
		int			nPos		  = 0;

		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_H264_DXVA;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_H264;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_VC1_DXVA;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_VC1;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_XVID;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_DIVX;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_MSMPEG4;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_FLASH;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_VP6;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_WMV;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_H263;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_SVQ3;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_AMVV;
		if (m_lstCodecs.GetCheck  (nPos++)) nActiveCodecs |= MPCVD_THEORA;
		m_pMDF->SetActiveCodecs ((MPC_VIDEO_CODEC)nActiveCodecs);

		m_pMDF->Apply();
	}

	return true;
}
Example #2
0
bool CMPCVideoDecSettingsWnd::OnApply()
{
    OnDeactivate();

    if (m_pMDF && m_cbDXVACompatibilityCheck.m_hWnd) {
#if HAS_FFMPEG_VIDEO_DECODERS
#if INTERNAL_DECODER_H264
        m_pMDF->SetThreadNumber(m_cbThreadNumber.GetCurSel());
        m_pMDF->SetDiscardMode(g_AVDiscard[m_cbDiscardMode.GetCurSel()]);
#endif /* INTERNAL_DECODER_H264 */
        m_pMDF->SetErrorRecognition(g_AVErrRecognition[m_cbErrorRecognition.GetCurSel()]);
        m_pMDF->SetIDCTAlgo(m_cbIDCTAlgo.GetCurSel());

        m_pMDF->SetARMode(m_cbARMode.GetCheck());
#endif /* HAS_FFMPEG_VIDEO_DECODERS */

        m_pMDF->SetDXVACheckCompatibility(m_cbDXVACompatibilityCheck.GetCurSel());

        m_pMDF->SetDXVA_SD(m_cbDXVA_SD.GetCheck());

        m_pMDF->Apply();
    }

    return true;
}
Example #3
0
STDMETHODIMP CBasePropertyPage::Deactivate(void)
{
    if (m_hwnd == NULL) {
        return E_UNEXPECTED;
    }

    // Remove WS_EX_CONTROLPARENT before DestroyWindow call

    DWORD dwStyle = GetWindowLong(m_hwnd, GWL_EXSTYLE);
    dwStyle = dwStyle & (~WS_EX_CONTROLPARENT);

    //  Set m_hwnd to be NULL temporarily so the message handler
    //  for WM_STYLECHANGING doesn't add the WS_EX_CONTROLPARENT
    //  style back in
    HWND hwnd = m_hwnd;
    m_hwnd = NULL;
    SetWindowLong(hwnd, GWL_EXSTYLE, dwStyle);
    m_hwnd = hwnd;

    OnDeactivate();

    // Destroy the dialog window

    DestroyWindow(m_hwnd);
    m_hwnd = NULL;
    return NOERROR;
}
Example #4
0
LRESULT
TopWindow::OnMessage(HWND _hWnd, UINT message,
                      WPARAM wParam, LPARAM lParam)
{
  switch (message) {
  case WM_CLOSE:
    if (OnClose())
      /* true returned: message was handled */
      return 0;
    break;

  case WM_ACTIVATE:
#ifdef HAVE_AYGSHELL_DLL
    ayg_shell_dll.SHHandleWMActivate(_hWnd, wParam, lParam, &s_sai, FALSE);
#endif

    if (wParam == WA_INACTIVE ? OnDeactivate() : OnActivate())
      return true;
    break;

  case WM_SETTINGCHANGE:
#ifdef HAVE_AYGSHELL_DLL
    ayg_shell_dll.SHHandleWMSettingChange(_hWnd, wParam, lParam, &s_sai);
#endif
    break;
  };
  return ContainerWindow::OnMessage(_hWnd, message, wParam, lParam);
}
Example #5
0
	void DebugMenu::Refresh()
	{
		if (!m_Panel || !IsVisible())
			return;

		OnDeactivate();
		OnActivate();
	}
//-----------------------------------------------------------------------------
// Purpose: Called when this tool is no longer the active tool.
// Input  : eNewTool - The tool that is being activated.
//-----------------------------------------------------------------------------
void CBaseTool::Deactivate()
{
	OnDeactivate();

	if ( m_pDocument )
		m_pDocument->UpdateAllViews( MAPVIEW_UPDATE_TOOL );

	m_bActiveTool = false;
}
Example #7
0
static void menu_DeactivateMenuItem()
{
	// g_top is always the first item
	if(g_itemStack.size() > 1) 
	{
		auto ptr = g_itemStack.back();
		g_itemStack.pop_back();
		ptr->OnDeactivate();
		ptr->ClearFlag(MENUSTATE_Active);
	}
}
Example #8
0
bool CAviSplitterSettingsWnd::OnApply()
{
	OnDeactivate();

	if (m_pMSF) {
		m_pMSF->SetBadInterleavedSuport(m_cbBadInterleavedSuport.GetCheck());
		m_pMSF->SetReindex(m_cbSetReindex.GetCheck());
		m_pMSF->Apply();
	}

	return true;
}
Example #9
0
void cPawn::RemoveEntityEffect(cEntityEffect::eType a_EffectType)
{
	m_World->BroadcastRemoveEntityEffect(*this, a_EffectType);
	auto itr = m_EntityEffects.find(a_EffectType);
	if (itr != m_EntityEffects.end())
	{
		// Erase from effect map before calling OnDeactivate to allow metadata broadcasts (e.g. for invisibility effect)
		auto Effect = std::move(itr->second);
		m_EntityEffects.erase(itr);
		Effect->OnDeactivate(*this);
	}
}
Example #10
0
HRESULT CDVSBasePPage::OnApplyChanges()
{
	ASSERT(m_pDirectVobSub);

	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	if (m_bIsInitialized) {
		OnDeactivate();
		UpdateObjectData(true);
		m_pDirectVobSub->UpdateRegistry(); // *
		OnActivate();
	}

	return NOERROR;
}
Example #11
0
bool CMpaDecSettingsWnd::OnApply()
{
	OnDeactivate();

	if(m_pMDF)
	{
		m_pMDF->SetSampleFormat((MPCSampleFormat)m_outputformat);
		m_pMDF->SetSpeakerConfig(IMpaDecFilter::ac3, m_ac3spkcfg);
		m_pMDF->SetDynamicRangeControl(IMpaDecFilter::ac3, m_ac3drc);
		m_pMDF->SetSpeakerConfig(IMpaDecFilter::dts, m_dtsspkcfg);
		m_pMDF->SetDynamicRangeControl(IMpaDecFilter::dts, m_dtsdrc);
		m_pMDF->SetSpeakerConfig(IMpaDecFilter::aac, m_aacdownmix);
	}

	return true;
}
bool CMpeg2DecSettingsWnd::OnApply()
{
	OnDeactivate();

	if(m_pM2DF)
	{
		m_pM2DF->SetDeinterlaceMethod(m_ditype);
		m_pM2DF->SetBrightness(m_procamp[0]);
		m_pM2DF->SetContrast(m_procamp[1]);
		m_pM2DF->SetHue(m_procamp[2]);
		m_pM2DF->SetSaturation(m_procamp[3]);
		m_pM2DF->EnableForcedSubtitles(m_forcedsubs);
		m_pM2DF->EnablePlanarYUV(m_planaryuv);
		m_pM2DF->EnableInterlaced(m_interlaced);
	}

	return true;
}
bool CMpcAudioRendererSettingsWnd::OnApply()
{
    OnDeactivate();

    if (m_pMAR) {
        m_pMAR->SetWasapiMode(m_cbWasapiMode.GetCheck());
        m_pMAR->SetMuteFastForward(m_cbMuteFastForward.GetCheck());
        CString str;
        int idx = m_cbSoundDevice.GetCurSel();
        if (!(idx < 0)) {
            m_cbSoundDevice.GetLBText(idx, str);
            m_pMAR->SetSoundDevice(str);
        }
        m_pMAR->Apply();
    }

    return true;
}
Example #14
0
LRESULT
TopWindow::OnMessage(HWND _hWnd, UINT message,
                      WPARAM wParam, LPARAM lParam)
{
  switch (message) {
  case WM_CLOSE:
    if (OnClose())
      /* true returned: message was handled */
      return 0;
    break;

  case WM_ACTIVATE:
    if (wParam == WA_INACTIVE ? OnDeactivate() : OnActivate())
      return true;
    break;
  }
  return ContainerWindow::OnMessage(_hWnd, message, wParam, lParam);
}
bool CMPCDXVAVideoDecSettingsWnd::OnApply()
{
    OnDeactivate();

    if (m_pMDF && m_cbDXVACompatibilityCheck.m_hWnd) {
        m_pMDF->SetARMode(m_cbARMode.GetCheck());

        m_pMDF->SetDXVACheckCompatibility(m_cbDXVACompatibilityCheck.GetCurSel());

        m_pMDF->SetDXVA_SD(m_cbDXVA_SD.GetCheck());

        m_pMDF->SetInterlacedFlag((MPCVD_INTERLACED_FLAG)m_cbInterlacedFlag.GetCurSel());

        m_pMDF->Apply();
    }

    return true;
bool CMpcAudioRendererSettingsWnd::OnApply()
{
	OnDeactivate();

	if (m_pMAR) {
		m_pMAR->SetWasapiMode(m_cbWasapiMode.GetCurSel());
		m_pMAR->SetBitExactOutput(m_cbUseBitExactOutput.GetCheck());
		m_pMAR->SetSystemLayoutChannels(m_cbUseBitExactOutput.GetCheck() && m_cbUseSystemLayoutChannels.GetCheck());
		CString str;
		int idx = m_cbSoundDevice.GetCurSel();
		if (idx >= 0) {
			m_cbSoundDevice.GetLBText(idx, str);
			m_pMAR->SetSoundDevice(str);
		}
		m_pMAR->Apply();
	}

	return true;
}
bool CMpegSplitterSettingsWnd::OnApply()
{
	OnDeactivate();

	if(m_pMSF) {
		m_pMSF->SetFastStreamChange(m_cbFastStreamChange.GetCheck());
		m_pMSF->SetVC1_GuidFlag(m_cbVC1_GuidFlag.GetCurSel() + 1);

#ifdef REGISTER_FILTER		
		CString str = _T("");
		m_edtAudioLanguageOrder.GetWindowText(str);
		m_pMSF->SetAudioLanguageOrder(str);
		m_edtSubtitlesLanguageOrder.GetWindowText(str);
		m_pMSF->SetSubtitlesLanguageOrder(str);
#endif
		m_pMSF->Apply();
	}

	return true;
}
HRESULT CDVSBasePPage::OnApplyChanges()
{
	ASSERT(m_pDirectVobSub);

	AFX_MANAGE_STATE(AfxGetStaticModuleState());

	if (m_bIsInitialized && m_bDirty) {
		OnDeactivate();
		UpdateObjectData(true);
		m_pDirectVobSub->UpdateRegistry(); // *
		OnActivate();

		m_bDirty = FALSE;
		if (m_pPageSite) {
			m_pPageSite->OnStatusChange(PROPPAGESTATUS_CLEAN);
		}
	}

	return NOERROR;
}
Example #19
0
bool CMpaDecSettingsWnd::OnApply()
{
    OnDeactivate();

    if (m_pMDF) {
        m_pMDF->SetSampleFormat(SF_PCM16, m_outfmt_i16);
        m_pMDF->SetSampleFormat(SF_PCM24, m_outfmt_i24);
        m_pMDF->SetSampleFormat(SF_PCM32, m_outfmt_i32);
        m_pMDF->SetSampleFormat(SF_FLOAT, m_outfmt_flt);
        m_pMDF->SetMixer(m_mixer);
        m_pMDF->SetMixerLayout(m_mixer_layout);
        m_pMDF->SetDynamicRangeControl(m_drc);
        m_pMDF->SetSPDIF(IMpaDecFilter::ac3, m_spdif_ac3);
        m_pMDF->SetSPDIF(IMpaDecFilter::dts, m_spdif_dts);
        m_pMDF->SetSPDIF(IMpaDecFilter::dtshd, m_spdif_dtshd);

        m_pMDF->SaveSettings();
    }

    return true;
}
Example #20
0
DWORD CheatManager::Run(LPVOID)
{

	while(m_Duration > 0 && m_bRunning)
	{
		--m_Duration;
		Sleep(1000);
	}

	m_bRunning = false;

	OnDeactivate(m_pActiveCheat);

	m_pActiveCheat = NULL;

	Stop();

	Clear();

	return GetLastError();
}
bool CMPCDXVAVideoDecCodecWnd::OnApply()
{
    OnDeactivate();

    if (m_pMDF) {
        int nActiveCodecs = 0;
        int nPos = 0;

        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_H264_DXVA;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_VC1_DXVA;
        }
        m_pMDF->SetActiveCodecs((MPC_VIDEO_CODEC)nActiveCodecs);

        m_pMDF->Apply();
    }

    return true;
bool CMPCVideoDecSettingsWnd::OnApply()
{
	OnDeactivate();

	#if defined(REGISTER_FILTER) | INCLUDE_MPC_VIDEO_DECODER
	if(m_pMDF && m_cbErrorRecognition.m_hWnd)
	{
		#if defined(REGISTER_FILTER) | INTERNAL_DECODER_H264
		m_pMDF->SetThreadNumber		(m_cbThreadNumber.GetCurSel() + 1);
		m_pMDF->SetDiscardMode		(g_AVDiscard[m_cbDiscardMode.GetCurSel()]);
		#endif
		m_pMDF->SetErrorRecognition  (m_cbErrorRecognition.GetCurSel()+1);
		m_pMDF->SetIDCTAlgo			(m_cbIDCTAlgo.GetCurSel());
		
		m_pMDF->SetARMode(m_cbARMode.GetCheck());

		m_pMDF->Apply();
	}
	#endif

	return true;
}
bool CMpegSplitterSettingsWnd::OnApply()
{
	OnDeactivate();

	if (m_pMSF) {
		m_pMSF->SetForcedSub(m_cbForcedSub.GetCheck());
		m_pMSF->SetTrueHD(m_cbTrueHD.GetCheck() ? 0 : 1);
		m_pMSF->SetAlternativeDuration(m_cbAlternativeDuration.GetCheck());
		m_pMSF->SetSubEmptyPin(m_cbSubEmptyPin.GetCheck());

#ifdef REGISTER_FILTER
		CString str;
		m_edtAudioLanguageOrder.GetWindowText(str);
		m_pMSF->SetAudioLanguageOrder(str.GetBuffer());
		m_edtSubtitlesLanguageOrder.GetWindowText(str);
		m_pMSF->SetSubtitlesLanguageOrder(str.GetBuffer());
#endif
		m_pMSF->Apply();
	}

	return true;
}
bool CMpegSplitterSettingsWnd::OnApply()
{
    OnDeactivate();

    if (m_pMSF) {
        m_pMSF->SetFastStreamChange(m_cbFastStreamChange.GetCheck());
        m_pMSF->SetForcedSub(m_cbForcedSub.GetCheck());
        m_pMSF->SetVC1_GuidFlag(m_cbVC1_GuidFlag.GetCurSel() + 1);
        m_pMSF->SetTrueHD(m_cbTrueHD.GetCheck() ? 0 : m_cbAC3Core.GetCheck() ? 1 : 2);
        m_pMSF->SetAlternativeDuration(m_cbAlternativeDuration.GetCheck());

#ifdef STANDALONE_FILTER
        CString str = _T("");
        m_edtAudioLanguageOrder.GetWindowText(str);
        m_pMSF->SetAudioLanguageOrder(str.GetBuffer());
        m_edtSubtitlesLanguageOrder.GetWindowText(str);
        m_pMSF->SetSubtitlesLanguageOrder(str.GetBuffer());
#endif
        m_pMSF->Apply();
    }

    return true;
}
Example #25
0
void ZDrOleClient::OnDeactivate()
{
   OnDeactivate( FALSE );
}
Example #26
0
bool CMPCVideoDecCodecWnd::OnApply()
{
    OnDeactivate();

    if (m_pMDF) {
        int nActiveCodecs = 0;
        int nPos = 0;

#if INTERNAL_DECODER_H264_DXVA
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_H264_DXVA;
        }
#endif
#if INTERNAL_DECODER_VC1_DXVA
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_VC1_DXVA;
        }
#endif
#if INTERNAL_DECODER_WMV3_DXVA
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_WMV3_DXVA;
        }
#endif
#if INTERNAL_DECODER_MPEG2_DXVA
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_MPEG2_DXVA;
        }
#endif
#if INTERNAL_DECODER_H264
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_H264;
        }
#endif
#if INTERNAL_DECODER_VC1
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_VC1;
        }
#endif
#if HAS_FFMPEG_VIDEO_DECODERS
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_XVID;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_DIVX;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_MSMPEG4;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_FLASH;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_VP356;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_VP8;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_WMV;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_H263;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_SVQ3;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_AMVV;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_THEORA;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_MJPEG;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_INDEO;
        }
        if (m_lstCodecs.GetCheck(nPos++)) {
            nActiveCodecs |= MPCVD_RV;
        }
#endif
        m_pMDF->SetActiveCodecs((MPC_VIDEO_CODEC)nActiveCodecs);

        m_pMDF->Apply();
    }

    return true;
}
Example #27
0
void State::Deactivate() {
    mActive = false;
    OnDeactivate();
}