Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorv0lt <v0lt@users.sourceforge.net>2011-08-10 22:57:23 +0400
committerv0lt <v0lt@users.sourceforge.net>2011-08-10 22:57:23 +0400
commit3f21c3923cc0793b068cf74094225dabbd5c7dbb (patch)
tree3183ea489510b0573ae61c4a842c580d903ff52e /src
parent58261a34dd73d0a623c210b3cbb30f2d0d7980b9 (diff)
added message then color control is not supported
remove excess check git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3636 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r--src/apps/mplayerc/MainFrm.cpp102
1 files changed, 53 insertions, 49 deletions
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index 2f8af9aee..e242f707e 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -8124,60 +8124,64 @@ void CMainFrame::OnUpdatePlayVolumeBoost(CCmdUI* pCmdUI)
void CMainFrame::OnPlayColor(UINT nID)
{
- AppSettings& s = AfxGetAppSettings();
- COLORPROPERTY_RANGE* cr;
- //ColorRanges* crs = AfxGetMyApp()->ColorControls;
- int& brightness = s.iBrightness;
- int& contrast = s.iContrast;
- int& hue = s.iHue;
- int& saturation = s.iSaturation;
- CString tmp, str;
- switch (nID) {
+ if (m_pMC || m_pMFVP) {
+ AppSettings& s = AfxGetAppSettings();
+ COLORPROPERTY_RANGE* cr;
+ //ColorRanges* crs = AfxGetMyApp()->ColorControls;
+ int& brightness = s.iBrightness;
+ int& contrast = s.iContrast;
+ int& hue = s.iHue;
+ int& saturation = s.iSaturation;
+ CString tmp, str;
+ switch (nID) {
- case ID_COLOR_BRIGHTNESS_INC:
- brightness += 2;
- case ID_COLOR_BRIGHTNESS_DEC:
- cr = AfxGetMyApp()->GetColorControl(Brightness);
- brightness = min(max(brightness-1, cr->MinValue), cr->MaxValue);
- tmp.Format(_T("%s%d"), (brightness>0 ? _T("+") : _T("")), brightness);
- str.Format(ResStr(IDS_OSD_BRIGHTNESS), tmp);
- break;
+ case ID_COLOR_BRIGHTNESS_INC:
+ brightness += 2;
+ case ID_COLOR_BRIGHTNESS_DEC:
+ cr = AfxGetMyApp()->GetColorControl(Brightness);
+ brightness = min(max(brightness-1, cr->MinValue), cr->MaxValue);
+ tmp.Format(_T("%s%d"), (brightness>0 ? _T("+") : _T("")), brightness);
+ str.Format(ResStr(IDS_OSD_BRIGHTNESS), tmp);
+ break;
- case ID_COLOR_CONTRAST_INC:
- contrast += 2;
- case ID_COLOR_CONTRAST_DEC:
- cr = AfxGetMyApp()->GetColorControl(Contrast);
- contrast = min(max(contrast-1, cr->MinValue), cr->MaxValue);
- str.Format(ResStr(IDS_OSD_CONTRAST), contrast);
- break;
+ case ID_COLOR_CONTRAST_INC:
+ contrast += 2;
+ case ID_COLOR_CONTRAST_DEC:
+ cr = AfxGetMyApp()->GetColorControl(Contrast);
+ contrast = min(max(contrast-1, cr->MinValue), cr->MaxValue);
+ str.Format(ResStr(IDS_OSD_CONTRAST), contrast);
+ break;
- case ID_COLOR_HUE_INC:
- hue += 2;
- case ID_COLOR_HUE_DEC:
- cr = AfxGetMyApp()->GetColorControl(Hue);
- hue =min(max(hue-1, cr->MinValue), cr->MaxValue);
- tmp.Format(_T("%s%d"), (hue>0 ? _T("+") : _T("")), hue);
- str.Format(ResStr(IDS_OSD_HUE), tmp);
- break;
+ case ID_COLOR_HUE_INC:
+ hue += 2;
+ case ID_COLOR_HUE_DEC:
+ cr = AfxGetMyApp()->GetColorControl(Hue);
+ hue =min(max(hue-1, cr->MinValue), cr->MaxValue);
+ tmp.Format(_T("%s%d"), (hue>0 ? _T("+") : _T("")), hue);
+ str.Format(ResStr(IDS_OSD_HUE), tmp);
+ break;
- case ID_COLOR_SATURATION_INC:
- saturation += 2;
- case ID_COLOR_SATURATION_DEC:
- cr = AfxGetMyApp()->GetColorControl(Saturation);
- saturation = min(max(saturation-1, cr->MinValue), cr->MaxValue);
- str.Format(ResStr(IDS_OSD_SATURATION), saturation);
- break;
+ case ID_COLOR_SATURATION_INC:
+ saturation += 2;
+ case ID_COLOR_SATURATION_DEC:
+ cr = AfxGetMyApp()->GetColorControl(Saturation);
+ saturation = min(max(saturation-1, cr->MinValue), cr->MaxValue);
+ str.Format(ResStr(IDS_OSD_SATURATION), saturation);
+ break;
- case ID_COLOR_RESET:
- brightness = AfxGetMyApp()->GetColorControl(Brightness)->DefaultValue;
- contrast = AfxGetMyApp()->GetColorControl(Contrast)->DefaultValue;
- hue = AfxGetMyApp()->GetColorControl(Hue)->DefaultValue;
- saturation = AfxGetMyApp()->GetColorControl(Saturation)->DefaultValue;
- str = ResStr(IDS_OSD_RESET_COLOR);
- break;
+ case ID_COLOR_RESET:
+ brightness = AfxGetMyApp()->GetColorControl(Brightness)->DefaultValue;
+ contrast = AfxGetMyApp()->GetColorControl(Contrast)->DefaultValue;
+ hue = AfxGetMyApp()->GetColorControl(Hue)->DefaultValue;
+ saturation = AfxGetMyApp()->GetColorControl(Saturation)->DefaultValue;
+ str = ResStr(IDS_OSD_RESET_COLOR);
+ break;
+ }
+ SetColorControl(brightness, contrast, hue, saturation);
+ m_OSD.DisplayMessage(OSD_TOPLEFT, str);
+ } else {
+ m_OSD.DisplayMessage(OSD_TOPLEFT, ResStr(IDS_OSD_NO_COLORCONTROL));
}
- SetColorControl(brightness, contrast, hue, saturation);
- m_OSD.DisplayMessage(OSD_TOPLEFT, str);
}
void CMainFrame::OnAfterplayback(UINT nID)
@@ -14471,7 +14475,7 @@ void CMainFrame::SetColorControl(int iBrightness, int iContrast, int iHue, int i
static VMR9ProcAmpControl ClrControl;
static DXVA2_ProcAmpValues ClrValues;
- if (m_pMC && !AfxGetAppSettings().m_RenderersSettings.fVMR9MixerYUV) {
+ if (m_pMC) {
ClrControl.dwSize = sizeof(ClrControl);
ClrControl.dwFlags = ProcAmpControl9_Mask;
ClrControl.Brightness = (float)iBrightness;