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
diff options
context:
space:
mode:
-rw-r--r--src/apps/mplayerc/AppSettings.cpp289
-rw-r--r--src/apps/mplayerc/AppSettings.h141
-rw-r--r--src/apps/mplayerc/ChildView.cpp14
-rw-r--r--src/apps/mplayerc/ChildView.h4
-rw-r--r--src/apps/mplayerc/FGManager.cpp8
-rw-r--r--src/apps/mplayerc/FGManagerBDA.cpp24
-rw-r--r--src/apps/mplayerc/ISDb.cpp2
-rw-r--r--src/apps/mplayerc/MainFrm.cpp270
-rw-r--r--src/apps/mplayerc/MainFrm.h20
-rw-r--r--src/apps/mplayerc/OpenDirHelper.cpp4
-rw-r--r--src/apps/mplayerc/OpenDirHelper.h2
-rw-r--r--src/apps/mplayerc/OpenDlg.cpp6
-rw-r--r--src/apps/mplayerc/PPageAccelTbl.cpp10
-rw-r--r--src/apps/mplayerc/PPageAudioSwitcher.cpp16
-rw-r--r--src/apps/mplayerc/PPageBase.cpp2
-rw-r--r--src/apps/mplayerc/PPageCapture.cpp12
-rw-r--r--src/apps/mplayerc/PPageDVD.cpp4
-rw-r--r--src/apps/mplayerc/PPageExternalFilters.cpp8
-rw-r--r--src/apps/mplayerc/PPageFormats.cpp30
-rw-r--r--src/apps/mplayerc/PPageFullscreen.cpp10
-rw-r--r--src/apps/mplayerc/PPageLogo.cpp12
-rw-r--r--src/apps/mplayerc/PPageOutput.cpp10
-rw-r--r--src/apps/mplayerc/PPagePlayback.cpp8
-rw-r--r--src/apps/mplayerc/PPagePlayer.cpp6
-rw-r--r--src/apps/mplayerc/PPageSheet.cpp2
-rw-r--r--src/apps/mplayerc/PPageSubMisc.cpp12
-rw-r--r--src/apps/mplayerc/PPageTweaks.cpp20
-rw-r--r--src/apps/mplayerc/PPageWebServer.cpp16
-rw-r--r--src/apps/mplayerc/PlayerCaptureDialog.cpp52
-rw-r--r--src/apps/mplayerc/PlayerNavigationDialog.cpp14
-rw-r--r--src/apps/mplayerc/PlayerPlaylistBar.cpp2
-rw-r--r--src/apps/mplayerc/PlayerSeekBar.cpp2
-rw-r--r--src/apps/mplayerc/Playlist.cpp7
-rw-r--r--src/apps/mplayerc/Playlist.h2
-rw-r--r--src/apps/mplayerc/SaveDlg.cpp1
-rw-r--r--src/apps/mplayerc/ShaderCombineDlg.cpp8
-rw-r--r--src/apps/mplayerc/TunerScanDlg.cpp28
-rw-r--r--src/apps/mplayerc/VMROSD.cpp6
-rw-r--r--src/apps/mplayerc/VMROSD.h2
-rw-r--r--src/apps/mplayerc/WebServer.cpp6
-rw-r--r--src/apps/mplayerc/mplayerc.cpp40
-rw-r--r--src/apps/mplayerc/mplayerc.h10
42 files changed, 571 insertions, 571 deletions
diff --git a/src/apps/mplayerc/AppSettings.cpp b/src/apps/mplayerc/AppSettings.cpp
index 6cbe9e34b..54d0427fa 100644
--- a/src/apps/mplayerc/AppSettings.cpp
+++ b/src/apps/mplayerc/AppSettings.cpp
@@ -23,18 +23,8 @@
#include "stdafx.h"
#include "mplayerc.h"
-#include <atlsync.h>
-#include <Tlhelp32.h>
-#include "MainFrm.h"
-#include "../../DSUtil/DSUtil.h"
-#include "Struct.h"
-#include "FileVersionInfo.h"
-#include <psapi.h>
-#include "Ifo.h"
#include "MiniDump.h"
-#include "SettingsDefines.h"
-#include "Monitors.h"
#include "AppSettings.h"
// Settings
@@ -44,7 +34,7 @@ CAppSettings::CAppSettings()
, MRUDub(0, _T("Recent Dub List"), _T("Dub%d"), 20)
, hAccel(NULL)
, nCmdlnWebServerPort(-1)
- , ShowDebugInfo(false)
+ , fShowDebugInfo(false)
{
// Internal source filter
#if INTERNAL_SOURCEFILTER_CDDA
@@ -211,7 +201,6 @@ CAppSettings::CAppSettings()
}
-
void CAppSettings::CreateCommands()
{
#define ADDCMD(cmd) wmcmds.AddTail(wmcmd##cmd)
@@ -385,20 +374,20 @@ CAppSettings::~CAppSettings()
DestroyAcceleratorTable(hAccel);
}
-bool CAppSettings::IsD3DFullscreen()
+bool CAppSettings::IsD3DFullscreen() const
{
if(nCLSwitches&CLSW_D3DFULLSCREEN)
return true;
else
return fD3DFullscreen;
}
-CString CAppSettings::SelectedAudioRenderer()
+CString CAppSettings::SelectedAudioRenderer() const
{
CString strResult;
if(AfxGetMyApp()->m_AudioRendererDisplayName_CL != _T(""))
strResult = AfxGetMyApp()->m_AudioRendererDisplayName_CL;
else
- strResult = AfxGetAppSettings().AudioRendererDisplayName;
+ strResult = AfxGetAppSettings().strAudioRendererDisplayName;
return strResult;
}
@@ -474,7 +463,7 @@ bool CAppSettings::NewFile(LPCTSTR strFileName)
}
-void CAppSettings::DeserializeHex (LPCTSTR strVal, BYTE* pBuffer, int nBufSize)
+void CAppSettings::DeserializeHex (LPCTSTR strVal, BYTE* pBuffer, int nBufSize) const
{
long lRes;
@@ -485,7 +474,7 @@ void CAppSettings::DeserializeHex (LPCTSTR strVal, BYTE* pBuffer, int nBufSize)
}
}
-CString CAppSettings::SerializeHex (BYTE* pBuffer, int nBufSize)
+CString CAppSettings::SerializeHex (BYTE* pBuffer, int nBufSize) const
{
CString strTemp;
CString strResult;
@@ -511,7 +500,7 @@ void CAppSettings::UpdateData(bool fSave)
{
if(!fInitialized) return;
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, fCaptionMenuMode);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, iCaptionMenuMode);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDENAVIGATION, fHideNavigation);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_CONTROLSTATE, nCS);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DEFAULTVIDEOFRAME, iDefaultVideoSize);
@@ -539,9 +528,9 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_REMEMBERWINDOWSIZE, fRememberWindowSize);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SNAPTODESKTOPEDGES, fSnapToDesktopEdges);
pApp->WriteProfileBinary(IDS_R_SETTINGS, IDS_RS_LASTWINDOWRECT, (BYTE*)&rcLastWindowPos, sizeof(rcLastWindowPos));
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LASTWINDOWTYPE, lastWindowType);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_X, AspectRatio.cx);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_Y, AspectRatio.cy);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LASTWINDOWTYPE, nLastWindowType);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_X, sizeAspectRatio.cx);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_Y, sizeAspectRatio.cy);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_KEEPHISTORY, fKeepHistory);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DSVIDEORENDERERTYPE, iDSVideoRendererType);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_RMVIDEORENDERERTYPE, iRMVideoRendererType);
@@ -549,15 +538,15 @@ void CAppSettings::UpdateData(bool fSave)
UpdateRenderersData(true);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, CString(AudioRendererDisplayName));
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, CString(strAudioRendererDisplayName));
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, fAutoloadAudio);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADSUBTITLES, fAutoloadSubtitles);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER, CString(m_subtitlesLanguageOrder));
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER, CString(m_audiosLanguageOrder));
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER, CString(strSubtitlesLanguageOrder));
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER, CString(strAudiosLanguageOrder));
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_BLOCKVSFILTER, fBlockVSFilter);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWORKERTHREADFOROPENING, fEnableWorkerThreadForOpening);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_REPORTFAILEDPINS, fReportFailedPins);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_DVDPATH, sDVDPath);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_DVDPATH, strDVDPath);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_USEDVDPATH, fUseDVDPath);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MENULANG, idMenuLang);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOLANG, idAudioLang);
@@ -572,11 +561,11 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLESUBTITLES, fEnableSubtitles);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITIZEEXTERNALSUBTITLES, fPrioritizeExternalSubtitles);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DISABLEINTERNALSUBTITLES, fDisableInternalSubtitles);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLEPATHS, szSubtitlePaths);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLEPATHS, strSubtitlePaths);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_USEDEFAULTSUBTITLESSTYLE, fUseDefaultSubtitlesStyle);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOSWITCHER, fEnableAudioSwitcher);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOTIMESHIFT, fAudioTimeShift);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOTIMESHIFT, tAudioTimeShift);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOTIMESHIFT, iAudioTimeShift);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DOWNSAMPLETO441, fDownSampleTo441);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_CUSTOMCHANNELMAPPING, fCustomChannelMapping);
pApp->WriteProfileBinary(IDS_R_SETTINGS, IDS_RS_SPEAKERTOCHANNELMAPPING, (BYTE*)pSpeakerToChannelMap, sizeof(pSpeakerToChannelMap));
@@ -584,26 +573,26 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIONORMALIZERECOVER, fAudioNormalizeRecover);
CString strTemp;
- strTemp.Format( _T("%f"), AudioBoost);
+ strTemp.Format( _T("%f"), dAudioBoost);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, strTemp);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPEAKERCHANNELS, fnChannels);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SPEAKERCHANNELS, nSpeakerChannels);
// Multi-monitor code
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR, CString(f_hmonitor));
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR, CString(strFullScreenMonitor));
// Prevent Minimize when in Fullscreen mode on non default monitor
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_PREVENT_MINIMIZE, m_fPreventMinimize);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_WIN7TASKBAR, m_fUseWin7TaskBar);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_EXIT_AFTER_PB, m_fExitAfterPlayback);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NEXT_AFTER_PB, m_fNextInDirAfterPlayback);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NO_SEARCH_IN_FOLDER, m_fDontUseSearchInFolder);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_OSD_SIZE, nOSD_Size);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_MPC_OSD_FONT, m_OSD_Font);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_PREVENT_MINIMIZE, fPreventMinimize);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_WIN7TASKBAR, fUseWin7TaskBar);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_EXIT_AFTER_PB, fExitAfterPlayback);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NEXT_AFTER_PB, fNextInDirAfterPlayback);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NO_SEARCH_IN_FOLDER, fDontUseSearchInFolder);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_OSD_SIZE, nOSDSize);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_MPC_OSD_FONT, strOSDFont);
// Associated types with icon or not...
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ASSOCIATED_WITH_ICON, fAssociatedWithIcons);
// Last Open Dir
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_LAST_OPEN_DIR, f_lastOpenDir);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_LAST_OPEN_DIR, strLastOpenDir);
// CASIMIR666 : new settings
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_D3DFULLSCREEN, fD3DFullscreen);
@@ -620,8 +609,8 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SHADERLIST, strShaderList);
pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SHADERLISTSCREENSPACE, strShaderListScreenSpace);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, (int)m_bToggleShader);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, (int)m_bToggleShaderScreenSpace);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, (int)fToggleShader);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, (int)fToggleShaderScreenSpace);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_SHOWOSD, (int)fShowOSD);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEEDLEDITOR, (int)fEnableEDLEditor);
@@ -634,25 +623,25 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt (IDS_RS_CAPTURE, IDS_RS_COUNTRY, iAnalogCountry);
// Save digital capture settings (BDA)
- pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_NETWORKPROVIDER, BDANetworkProvider);
- pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_TUNER, BDATuner);
- pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_RECEIVER, BDAReceiver);
- pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_STANDARD, BDAStandard);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_START, BDAScanFreqStart);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_END, BDAScanFreqEnd);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_BANDWIDTH, BDABandwidth);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_USE_OFFSET, BDAUseOffset);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_OFFSET, BDAOffset);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_IGNORE_ENCRYPTED_CHANNELS, BDAIgnoreEncryptedChannels);
- pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_DVB_LAST_CHANNEL, DVBLastChannel);
+ pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_NETWORKPROVIDER, strBDANetworkProvider);
+ pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_TUNER, strBDATuner);
+ pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_RECEIVER, strBDAReceiver);
+ //pApp->WriteProfileString(IDS_RS_DVB, IDS_RS_BDA_STANDARD, strBDAStandard);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_START, iBDAScanFreqStart);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_END, iBDAScanFreqEnd);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_BANDWIDTH, iBDABandwidth);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_USE_OFFSET, fBDAUseOffset);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_OFFSET, iBDAOffset);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_BDA_IGNORE_ENCRYPTED_CHANNELS, fBDAIgnoreEncryptedChannels);
+ pApp->WriteProfileInt(IDS_RS_DVB, IDS_RS_DVB_LAST_CHANNEL, nDVBLastChannel);
int iChannel = 0;
- POSITION pos = DVBChannels.GetHeadPosition();
+ POSITION pos = m_DVBChannels.GetHeadPosition();
while (pos)
{
CString strTemp;
CString strChannel;
- CDVBChannel& Channel = DVBChannels.GetNext(pos);
+ CDVBChannel& Channel = m_DVBChannels.GetNext(pos);
strTemp.Format(_T("%d"), iChannel);
pApp->WriteProfileString(IDS_RS_DVB, strTemp, Channel.ToString());
iChannel++;
@@ -701,10 +690,10 @@ void CAppSettings::UpdateData(bool fSave)
}
pApp->WriteProfileString(IDS_R_FILTERS, NULL, NULL);
- POSITION pos = filters.GetHeadPosition();
+ POSITION pos = m_filters.GetHeadPosition();
for(int i = 0; pos; i++)
{
- FilterOverride* f = filters.GetNext(pos);
+ FilterOverride* f = m_filters.GetNext(pos);
if(f->fTemporary)
continue;
@@ -747,7 +736,7 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_INTREALMEDIA, fIntRealMedia);
// pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIARENDERLESS, fRealMediaRenderless);
// pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_QUICKTIMERENDERER, iQuickTimeRenderer);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIAFPS, *((DWORD*)&RealMediaQuickTimeFPS));
+ //pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIAFPS, *((DWORD*)&dRealMediaQuickTimeFPS));
pApp->WriteProfileString(IDS_R_SETTINGS _T("\\") IDS_RS_PNSPRESETS, NULL, NULL);
for(int i = 0, j = m_pnspresets.GetCount(); i < j; i++)
@@ -777,9 +766,9 @@ void CAppSettings::UpdateData(bool fSave)
}
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WINLIRC, fWinLirc);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WINLIRCADDR, WinLircAddr);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WINLIRCADDR, strWinLircAddr);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_UICE, fUIce);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_UICEADDR, UIceAddr);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_UICEADDR, strUIceAddr);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_GLOBALMEDIA, fGlobalMedia);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_DISABLEXPTOOLBARS, fDisableXPToolbars);
@@ -791,9 +780,9 @@ void CAppSettings::UpdateData(bool fSave)
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_NOTIFYMSN, fNotifyMSN);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_NOTIFYGTSDLL, fNotifyGTSdll);
- pApp->WriteProfileInt(IDS_R_SETTINGS, _T("LastUsedPage"), iLastUsedPage);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, _T("LastUsedPage"), nLastUsedPage);
- Formats.UpdateData(true);
+ m_Formats.UpdateData(true);
// Internal filters
for (int f=0; f<SRC_LAST; f++)
@@ -805,37 +794,37 @@ void CAppSettings::UpdateData(bool fSave)
for (int f=0; f<FFM_LAST; f++)
pApp->WriteProfileInt(IDS_R_INTERNAL_FILTERS, FFMFiltersKeys[f], FFmpegFilters[f]);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_LOGOFILE, logofn);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOID, logoid);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOEXT, logoext);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_LOGOFILE, strLogoFileName);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOID, nLogoId);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOEXT, fLogoExternal);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECDROMSSUBMENU, fHideCDROMsSubMenu);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITY, priority);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LAUNCHFULLSCREEN, launchfullscreen);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITY, dwPriority);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_LAUNCHFULLSCREEN, fLaunchfullscreen);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWEBSERVER, fEnableWebServer);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPORT, nWebServerPort);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, fWebServerPrintDebugInfo);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERUSECOMPRESSION, fWebServerUseCompression);
pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERLOCALHOSTONLY, fWebServerLocalhostOnly);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, WebRoot);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, WebDefIndex);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI, WebServerCGI);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, strWebRoot);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, strWebDefIndex);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI, strWebServerCGI);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTPATH, SnapShotPath);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTEXT, SnapShotExt);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTPATH, strSnapShotPath);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTEXT, strSnapShotExt);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBROWS, ThumbRows);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBCOLS, ThumbCols);
- pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBWIDTH, ThumbWidth);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBROWS, iThumbRows);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBCOLS, iThumbCols);
+ pApp->WriteProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBWIDTH, iThumbWidth);
- pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_ISDB, ISDb);
+ pApp->WriteProfileString(IDS_R_SETTINGS, IDS_RS_ISDB, strISDb);
pApp->WriteProfileString(_T("Shaders"), NULL, NULL);
pApp->WriteProfileInt(_T("Shaders"), _T("Initialized"), 1);
- pApp->WriteProfileString(_T("Shaders"), _T("Combine"), m_shadercombine);
- pApp->WriteProfileString(_T("Shaders"), _T("CombineScreenSpace"), m_shadercombineScreenSpace);
+ pApp->WriteProfileString(_T("Shaders"), _T("Combine"), strShadercombine);
+ pApp->WriteProfileString(_T("Shaders"), _T("CombineScreenSpace"), strShadercombineScreenSpace);
pos = m_shaders.GetHeadPosition();
@@ -885,7 +874,7 @@ void CAppSettings::UpdateData(bool fSave)
if (iLanguage != 0) CMPlayerCApp::SetLanguage(iLanguage);
CreateCommands();
- fCaptionMenuMode = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, MODE_SHOWCAPTIONMENU);
+ iCaptionMenuMode = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECAPTIONMENU, MODE_SHOWCAPTIONMENU);
fHideNavigation = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDENAVIGATION, 0);
nCS = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_CONTROLSTATE, CS_SEEKBAR|CS_TOOLBAR|CS_STATUSBAR);
iDefaultVideoSize = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DEFAULTVIDEOFRAME, DVS_FROMINSIDE);
@@ -904,11 +893,11 @@ void CAppSettings::UpdateData(bool fSave)
UpdateRenderersData(false);
- AudioRendererDisplayName = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, _T(""));
+ strAudioRendererDisplayName = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIORENDERERTYPE, _T(""));
fAutoloadAudio = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADAUDIO, TRUE);
fAutoloadSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUTOLOADSUBTITLES, !CMPlayerCApp::IsVSFilterInstalled() || (IsVistaOrAbove() && CMPlayerCApp::HasEVR()) );
- m_subtitlesLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER, _T(""));
- m_audiosLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER, _T(""));
+ strSubtitlesLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLESLANGORDER, _T(""));
+ strAudiosLanguageOrder = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOSLANGORDER, _T(""));
fBlockVSFilter = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_BLOCKVSFILTER, TRUE);
fEnableWorkerThreadForOpening = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWORKERTHREADFOROPENING, TRUE);
fReportFailedPins = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REPORTFAILEDPINS, TRUE);
@@ -922,20 +911,20 @@ void CAppSettings::UpdateData(bool fSave)
nShowBarsWhenFullScreenTimeOut = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_FULLSCREENCTRLSTIMEOUT, 0);
//Multi-monitor code
- f_hmonitor = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR, _T(""));
+ strFullScreenMonitor = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_FULLSCREENMONITOR, _T(""));
// Prevent Minimize when in Fullscreen mode on non default monitor
- m_fPreventMinimize = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_PREVENT_MINIMIZE, 0);
- m_fUseWin7TaskBar = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_WIN7TASKBAR, 1);
- m_fExitAfterPlayback = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_EXIT_AFTER_PB, 0);
- m_fNextInDirAfterPlayback = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NEXT_AFTER_PB, 0);
- m_fDontUseSearchInFolder = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NO_SEARCH_IN_FOLDER, 0);
- nOSD_Size = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_OSD_SIZE, 20);
- m_OSD_Font= pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_MPC_OSD_FONT, _T("Arial"));
+ fPreventMinimize = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_PREVENT_MINIMIZE, 0);
+ fUseWin7TaskBar = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_WIN7TASKBAR, 1);
+ fExitAfterPlayback = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_EXIT_AFTER_PB, 0);
+ fNextInDirAfterPlayback = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NEXT_AFTER_PB, 0);
+ fDontUseSearchInFolder = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_NO_SEARCH_IN_FOLDER, 0);
+ nOSDSize = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MPC_OSD_SIZE, 20);
+ strOSDFont= pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_MPC_OSD_FONT, _T("Arial"));
// Associated types with icon or not...
fAssociatedWithIcons = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ASSOCIATED_WITH_ICON, 1);
// Last Open Dir
- f_lastOpenDir = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_LAST_OPEN_DIR, _T("C:\\"));
+ strLastOpenDir = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_LAST_OPEN_DIR, _T("C:\\"));
if ( pApp->GetProfileBinary(IDS_R_SETTINGS, IDS_RS_FULLSCREENRES, &ptr, &len) )
{
@@ -955,8 +944,8 @@ void CAppSettings::UpdateData(bool fSave)
fRememberWindowPos = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REMEMBERWINDOWPOS, 0);
fRememberWindowSize = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REMEMBERWINDOWSIZE, 0);
fSnapToDesktopEdges = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SNAPTODESKTOPEDGES, 0);
- AspectRatio.cx = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_X, 0);
- AspectRatio.cy = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_Y, 0);
+ sizeAspectRatio.cx = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_X, 0);
+ sizeAspectRatio.cy = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ASPECTRATIO_Y, 0);
fKeepHistory = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_KEEPHISTORY, 1);
if ( pApp->GetProfileBinary(IDS_R_SETTINGS, IDS_RS_LASTWINDOWRECT, &ptr, &len) )
{
@@ -970,8 +959,8 @@ void CAppSettings::UpdateData(bool fSave)
{
fRememberWindowPos = false;
}
- lastWindowType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LASTWINDOWTYPE, SIZE_RESTORED);
- sDVDPath = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_DVDPATH, _T(""));
+ nLastWindowType = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LASTWINDOWTYPE, SIZE_RESTORED);
+ strDVDPath = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_DVDPATH, _T(""));
fUseDVDPath = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_USEDVDPATH, 0);
idMenuLang = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_MENULANG, 0);
idAudioLang = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOLANG, 0);
@@ -992,11 +981,11 @@ void CAppSettings::UpdateData(bool fSave)
fEnableSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLESUBTITLES, TRUE);
fPrioritizeExternalSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITIZEEXTERNALSUBTITLES, FALSE);
fDisableInternalSubtitles = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DISABLEINTERNALSUBTITLES, FALSE);
- szSubtitlePaths = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLEPATHS, _T(".;.\\subtitles;.\\subs"));
+ strSubtitlePaths = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SUBTITLEPATHS, _T(".;.\\subtitles;.\\subs"));
fUseDefaultSubtitlesStyle = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_USEDEFAULTSUBTITLESSTYLE, FALSE);
fEnableAudioSwitcher = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOSWITCHER, TRUE);
fAudioTimeShift = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEAUDIOTIMESHIFT, 0);
- tAudioTimeShift = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOTIMESHIFT, 0);
+ iAudioTimeShift = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIOTIMESHIFT, 0);
fDownSampleTo441 = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_DOWNSAMPLETO441, 0);
fCustomChannelMapping = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_CUSTOMCHANNELMAPPING, 0);
@@ -1034,9 +1023,9 @@ void CAppSettings::UpdateData(bool fSave)
fAudioNormalize = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIONORMALIZE, FALSE);
fAudioNormalizeRecover = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_AUDIONORMALIZERECOVER, TRUE);
- AudioBoost = (float)_tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, _T("1")));
+ dAudioBoost = (float)_tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_AUDIOBOOST, _T("1")));
- fnChannels = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPEAKERCHANNELS, 2);
+ nSpeakerChannels = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SPEAKERCHANNELS, 2);
{
for(int i = 0; ; i++)
@@ -1093,15 +1082,15 @@ void CAppSettings::UpdateData(bool fSave)
f->dwMerit = pApp->GetProfileInt(key, _T("Merit"), MERIT_DO_NOT_USE+1);
- filters.AddTail(f);
+ m_filters.AddTail(f);
}
}
fIntRealMedia = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_INTREALMEDIA, 0);
//fRealMediaRenderless = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIARENDERLESS, 0);
//iQuickTimeRenderer = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_QUICKTIMERENDERER, 2);
- RealMediaQuickTimeFPS = 25.0;
- *((DWORD*)&RealMediaQuickTimeFPS) = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIAFPS, *((DWORD*)&RealMediaQuickTimeFPS));
+ //dRealMediaQuickTimeFPS = 25.0;
+ //*((DWORD*)&dRealMediaQuickTimeFPS) = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_REALMEDIAFPS, *((DWORD*)&dRealMediaQuickTimeFPS));
m_pnspresets.RemoveAll();
for(int i = 0; i < (ID_PANNSCAN_PRESETS_END - ID_PANNSCAN_PRESETS_START); i++)
@@ -1159,9 +1148,9 @@ void CAppSettings::UpdateData(bool fSave)
for(int i = 0; pos; i++) pAccel[i] = wmcmds.GetNext(pos);
hAccel = CreateAcceleratorTable(pAccel.GetData(), pAccel.GetCount());
- WinLircAddr = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WINLIRCADDR, _T("127.0.0.1:8765"));
+ strWinLircAddr = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WINLIRCADDR, _T("127.0.0.1:8765"));
fWinLirc = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WINLIRC, 0);
- UIceAddr = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_UICEADDR, _T("127.0.0.1:1234"));
+ strUIceAddr = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_UICEADDR, _T("127.0.0.1:1234"));
fUIce = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_UICE, 0);
fGlobalMedia = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_GLOBALMEDIA, 0);
@@ -1174,7 +1163,7 @@ void CAppSettings::UpdateData(bool fSave)
fNotifyMSN = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_NOTIFYMSN, FALSE);
fNotifyGTSdll = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_NOTIFYGTSDLL, FALSE);
- Formats.UpdateData(false);
+ m_Formats.UpdateData(false);
// Internal filters
for (int f=0; f<SRC_LAST; f++)
@@ -1186,24 +1175,24 @@ void CAppSettings::UpdateData(bool fSave)
for (int f=0; f<FFM_LAST; f++)
FFmpegFilters[f] = !!pApp->GetProfileInt(IDS_R_INTERNAL_FILTERS, FFMFiltersKeys[f], 1);
- logofn = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_LOGOFILE, _T(""));
- logoid = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOID, DEF_LOGO);
- logoext = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOEXT, 0);
+ strLogoFileName = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_LOGOFILE, _T(""));
+ nLogoId = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOID, DEF_LOGO);
+ fLogoExternal = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LOGOEXT, 0);
fHideCDROMsSubMenu = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_HIDECDROMSSUBMENU, 0);
- priority = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITY, NORMAL_PRIORITY_CLASS);
- ::SetPriorityClass(::GetCurrentProcess(), priority);
- launchfullscreen = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LAUNCHFULLSCREEN, FALSE);
+ dwPriority = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_PRIORITY, NORMAL_PRIORITY_CLASS);
+ ::SetPriorityClass(::GetCurrentProcess(), dwPriority);
+ fLaunchfullscreen = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_LAUNCHFULLSCREEN, FALSE);
fEnableWebServer = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEWEBSERVER, FALSE);
nWebServerPort = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPORT, 13579);
fWebServerPrintDebugInfo = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERPRINTDEBUGINFO, FALSE);
fWebServerUseCompression = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERUSECOMPRESSION, TRUE);
fWebServerLocalhostOnly = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_WEBSERVERLOCALHOSTONLY, FALSE);
- WebRoot = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, _T("*./webroot"));
- WebDefIndex = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, _T("index.html;index.php"));
- WebServerCGI = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI, _T(""));
+ strWebRoot = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBROOT, _T("*./webroot"));
+ strWebDefIndex = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBDEFINDEX, _T("index.html;index.php"));
+ strWebServerCGI = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_WEBSERVERCGI, _T(""));
CString MyPictures;
@@ -1217,18 +1206,16 @@ void CAppSettings::UpdateData(bool fSave)
if(ERROR_SUCCESS == key.QueryStringValue(_T("My Pictures"), MyPictures.GetBuffer(_MAX_PATH), &len)) MyPictures.ReleaseBufferSetLength(len);
else MyPictures.Empty();
}
- SnapShotPath = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTPATH, MyPictures);
- SnapShotExt = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTEXT, _T(".jpg"));
-
- ThumbRows = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBROWS, 4);
- ThumbCols = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBCOLS, 4);
- ThumbWidth = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBWIDTH, 1024);
+ strSnapShotPath = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTPATH, MyPictures);
+ strSnapShotExt = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SNAPSHOTEXT, _T(".jpg"));
- ISDb = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_ISDB, _T("www.opensubtitles.org/isdb"));
+ iThumbRows = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBROWS, 4);
+ iThumbCols = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBCOLS, 4);
+ iThumbWidth = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_THUMBWIDTH, 1024);
+ strISDb = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_ISDB, _T("www.opensubtitles.org/isdb"));
- iLastUsedPage = pApp->GetProfileInt(IDS_R_SETTINGS, _T("LastUsedPage"), 0);
-
+ nLastUsedPage = pApp->GetProfileInt(IDS_R_SETTINGS, _T("LastUsedPage"), 0);
//
m_shaders.RemoveAll();
@@ -1257,9 +1244,7 @@ void CAppSettings::UpdateData(bool fSave)
shaders[_T("denoise")] = IDF_SHADER_DENOISE;
shaders[_T("YV12 Chroma Upsampling")] = IDF_SHADER_YV12CHROMAUP;
- int iShader = 0;
-
- for(; ; iShader++)
+ for(int iShader=0; ; iShader++)
{
CString str;
str.Format(_T("%d"), iShader);
@@ -1282,7 +1267,7 @@ void CAppSettings::UpdateData(bool fSave)
}
pos = shaders.GetStartPosition();
- for(; pos; iShader++)
+ while(pos)
{
CAtlStringMap<UINT>::CPair* pPair = shaders.GetNext(pos);
@@ -1318,10 +1303,10 @@ void CAppSettings::UpdateData(bool fSave)
dContrast = (float)_tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_COLOR_CONTRAST, _T("1")));
dHue = (float)_tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_COLOR_HUE, _T("0")));
dSaturation = (float)_tstof(pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_COLOR_SATURATION, _T("1")));
- strShaderList = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SHADERLIST, _T(""));
+ strShaderList = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SHADERLIST, _T(""));
strShaderListScreenSpace = pApp->GetProfileString(IDS_R_SETTINGS, IDS_RS_SHADERLISTSCREENSPACE, _T(""));
- m_bToggleShader = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, 0);
- m_bToggleShaderScreenSpace = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, 0);
+ fToggleShader = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADER, 0);
+ fToggleShaderScreenSpace = pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_TOGGLESHADERSSCREENSPACE, 0);
fShowOSD = !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_SHOWOSD, 1);
fEnableEDLEditor= !!pApp->GetProfileInt(IDS_R_SETTINGS, IDS_RS_ENABLEEDLEDITOR, FALSE);
@@ -1332,17 +1317,17 @@ void CAppSettings::UpdateData(bool fSave)
strAnalogAudio = pApp->GetProfileString(IDS_RS_CAPTURE, IDS_RS_AUDIO_DISP_NAME, _T("dummy"));
iAnalogCountry = pApp->GetProfileInt(IDS_RS_CAPTURE, IDS_RS_COUNTRY, 1);
- BDANetworkProvider = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_NETWORKPROVIDER, _T(""));
- BDATuner = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_TUNER, _T(""));
- BDAReceiver = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_RECEIVER, _T(""));
- BDAStandard = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_STANDARD, _T(""));
- BDAScanFreqStart = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_START, 474000);
- BDAScanFreqEnd = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_END, 858000);
- BDABandwidth = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_BANDWIDTH, 8);
- BDAUseOffset = !!pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_USE_OFFSET, 0);
- BDAOffset = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_OFFSET, 166);
- BDAIgnoreEncryptedChannels = !!pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_IGNORE_ENCRYPTED_CHANNELS, 0);
- DVBLastChannel = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_DVB_LAST_CHANNEL, 1);
+ strBDANetworkProvider = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_NETWORKPROVIDER, _T(""));
+ strBDATuner = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_TUNER, _T(""));
+ strBDAReceiver = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_RECEIVER, _T(""));
+ //sBDAStandard = pApp->GetProfileString(IDS_RS_DVB, IDS_RS_BDA_STANDARD, _T(""));
+ iBDAScanFreqStart = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_START, 474000);
+ iBDAScanFreqEnd = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_SCAN_FREQ_END, 858000);
+ iBDABandwidth = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_BANDWIDTH, 8);
+ fBDAUseOffset = !!pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_USE_OFFSET, 0);
+ iBDAOffset = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_OFFSET, 166);
+ fBDAIgnoreEncryptedChannels = !!pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_BDA_IGNORE_ENCRYPTED_CHANNELS, 0);
+ nDVBLastChannel = pApp->GetProfileInt(IDS_RS_DVB, IDS_RS_DVB_LAST_CHANNEL, 1);
for(int iChannel = 0; ; iChannel++)
{
@@ -1353,7 +1338,7 @@ void CAppSettings::UpdateData(bool fSave)
strChannel = pApp->GetProfileString(IDS_RS_DVB, strTemp, _T(""));
if (strChannel.IsEmpty()) break;
Channel.FromString(strChannel);
- DVBChannels.AddTail (Channel);
+ m_DVBChannels.AddTail (Channel);
}
// playback positions for last played DVDs
@@ -1395,10 +1380,10 @@ void CAppSettings::UpdateData(bool fSave)
// TODO: sort shaders by label
- m_shadercombine = pApp->GetProfileString(_T("Shaders"), _T("Combine"), _T(""));
- m_shadercombineScreenSpace = pApp->GetProfileString(_T("Shaders"), _T("CombineScreenSpace"), _T(""));
+ strShadercombine = pApp->GetProfileString(_T("Shaders"), _T("Combine"), _T(""));
+ strShadercombineScreenSpace = pApp->GetProfileString(_T("Shaders"), _T("CombineScreenSpace"), _T(""));
- if(launchfullscreen) nCLSwitches |= CLSW_FULLSCREEN;
+ if(fLaunchfullscreen) nCLSwitches |= CLSW_FULLSCREEN;
fInitialized = true;
}
@@ -1562,7 +1547,7 @@ void CAppSettings::SaveCurrentDVDPosition( )
pApp->WriteProfileString(IDS_R_SETTINGS, strDVDPos, strValue);
}
-__int64 CAppSettings::ConvertTimeToMSec(CString& time)
+__int64 CAppSettings::ConvertTimeToMSec(CString& time) const
{
__int64 Sec = 0;
__int64 mSec = 0;
@@ -1638,10 +1623,10 @@ void CAppSettings::ParseCommandLine(CAtlList<CString>& cmdln)
lDVDChapter = 0;
memset (&DVDPosition, 0, sizeof(DVDPosition));
iAdminOption=0;
- fixedWindowSize.SetSize(0, 0);
+ sizeFixedWindow.SetSize(0, 0);
iMonitor = 0;
hMasterWnd = 0;
- sPnSPreset.Empty();
+ strPnSPreset.Empty();
POSITION pos = cmdln.GetHeadPosition();
while(pos)
@@ -1711,8 +1696,8 @@ void CAppSettings::ParseCommandLine(CAtlList<CString>& cmdln)
Explode(cmdln.GetNext(pos), sl, ',', 2);
if(sl.GetCount() == 2)
{
- fixedWindowSize.SetSize(_ttol(sl.GetHead()), _ttol(sl.GetTail()));
- if(fixedWindowSize.cx > 0 && fixedWindowSize.cy > 0)
+ sizeFixedWindow.SetSize(_ttol(sl.GetHead()), _ttol(sl.GetTail()));
+ if(sizeFixedWindow.cx > 0 && sizeFixedWindow.cy > 0)
nCLSwitches |= CLSW_FIXEDSIZE;
}
}
@@ -1725,7 +1710,7 @@ void CAppSettings::ParseCommandLine(CAtlList<CString>& cmdln)
{
CMiniDump::Enable();
}
- else if(sw == _T("pns")) sPnSPreset = cmdln.GetNext(pos);
+ else if(sw == _T("pns")) strPnSPreset = cmdln.GetNext(pos);
else if(sw == _T("webport") && pos)
{
int tmpport = _tcstol(cmdln.GetNext(pos), NULL, 10);
@@ -1734,7 +1719,7 @@ void CAppSettings::ParseCommandLine(CAtlList<CString>& cmdln)
}
else if(sw == _T("debug"))
{
- ShowDebugInfo = true;
+ fShowDebugInfo = true;
}
else if(sw == _T("audiorenderer") && pos)
{
@@ -1822,10 +1807,10 @@ void CAppSettings::AddFav(favtype ft, CString s)
CDVBChannel* CAppSettings::FindChannelByPref(int nPrefNumber)
{
- POSITION pos = DVBChannels.GetHeadPosition();
+ POSITION pos = m_DVBChannels.GetHeadPosition();
while (pos)
{
- CDVBChannel& Channel = DVBChannels.GetNext (pos);
+ CDVBChannel& Channel = m_DVBChannels.GetNext (pos);
if (Channel.GetPrefNumber() == nPrefNumber)
{
return &Channel;
diff --git a/src/apps/mplayerc/AppSettings.h b/src/apps/mplayerc/AppSettings.h
index 647adc47a..621c93f5f 100644
--- a/src/apps/mplayerc/AppSettings.h
+++ b/src/apps/mplayerc/AppSettings.h
@@ -23,11 +23,12 @@
#pragma once
-#include "resource.h" // main symbols
-#include <afxadv.h>
-#include <atlsync.h>
+#include "SettingsDefines.h"
#include "RenderersSettings.h"
#include "internal_filter_config.h"
+#include "../../Subtitles/STS.h"
+#include "MediaFormats.h"
+#include "DVBChannel.h"
// flags for AppSettings::nCS
enum
@@ -401,7 +402,7 @@ public:
return(cmd > 0 && cmd == wc.cmd);
}
- CString GetName()
+ CString GetName() const
{
return ResStr (dwname);
}
@@ -413,7 +414,7 @@ public:
rmcmd.Empty();
rmrepcnt = 5;
}
- bool IsModified()
+ bool IsModified() const
{
return(memcmp((const ACCEL*)this, &backup, sizeof(ACCEL)) || appcmd != appcmdorg || mouse != mouseorg || !rmcmd.IsEmpty() || rmrepcnt != 5);
}
@@ -441,7 +442,7 @@ public:
CRemoteCtrlClient();
void SetHWND(HWND hWnd);
void Connect(CString addr);
- int GetStatus()
+ int GetStatus() const
{
return(m_nStatus);
}
@@ -481,7 +482,7 @@ class CAppSettings
public:
// cmdline params
- int nCLSwitches;
+ UINT nCLSwitches;
CAtlList<CString> slFiles, slDubs, slSubs, slFilters;
// Initial position (used by command line flags)
@@ -491,26 +492,26 @@ public:
ULONG lDVDChapter;
DVD_HMSF_TIMECODE DVDPosition;
- CSize fixedWindowSize;
+ CSize sizeFixedWindow;
bool HasFixedWindowSize() const
{
- return fixedWindowSize.cx > 0 || fixedWindowSize.cy > 0;
+ return sizeFixedWindow.cx > 0 || sizeFixedWindow.cy > 0;
}
//int iFixedWidth, iFixedHeight;
int iMonitor;
- CString sPnSPreset;
+ CString strPnSPreset;
void ParseCommandLine(CAtlList<CString>& cmdln);
// Added a Debug display to the screen (/debug option)
- bool ShowDebugInfo;
+ bool fShowDebugInfo;
int iDXVer;
int iAdminOption;
- int nCS;
- int fCaptionMenuMode;
+ UINT nCS; // Control state for toolbars
+ int iCaptionMenuMode; // normal -> borderless -> frameonly
bool fHideNavigation;
int iDefaultVideoSize;
bool fKeepAspectRatio;
@@ -519,7 +520,7 @@ public:
CRecentFileAndURLList MRU;
CRecentFileAndURLList MRUDub;
- CAutoPtrList<FilterOverride> filters;
+ CAutoPtrList<FilterOverride> m_filters;
CRenderersSettings m_RenderersSettings;
@@ -535,16 +536,16 @@ public:
bool fRewind;
int iZoomLevel;
//int iVideoRendererType;
- CStringW AudioRendererDisplayName;
+ CStringW strAudioRendererDisplayName;
bool fAutoloadAudio;
bool fAutoloadSubtitles;
bool fBlockVSFilter;
bool fEnableWorkerThreadForOpening;
bool fReportFailedPins;
- CStringW f_hmonitor;
+ CStringW strFullScreenMonitor;
bool fAssociatedWithIcons;
- CStringW f_lastOpenDir;
+ CStringW strLastOpenDir;
bool fAllowMultipleInst;
int iTitleBarTextStyle;
@@ -561,12 +562,12 @@ public:
bool fRememberWindowSize;
bool fSnapToDesktopEdges;
CRect rcLastWindowPos;
- UINT lastWindowType;
- CSize AspectRatio;
+ UINT nLastWindowType;
+ CSize sizeAspectRatio;
bool fKeepHistory;
- UINT iLastUsedPage;
+ UINT nLastUsedPage;
- CString sDVDPath;
+ CString strDVDPath;
bool fUseDVDPath;
LCID idMenuLang, idAudioLang, idSubtitlesLang;
bool fAutoSpeakerConf;
@@ -579,7 +580,7 @@ public:
bool fUseDefaultSubtitlesStyle;
bool fPrioritizeExternalSubtitles;
bool fDisableInternalSubtitles;
- CString szSubtitlePaths;
+ CString strSubtitlePaths;
bool fDisableXPToolbars;
bool fUseWMASFReader;
@@ -593,17 +594,17 @@ public:
bool fEnableAudioSwitcher;
bool fDownSampleTo441;
bool fAudioTimeShift;
- int tAudioTimeShift;
+ int iAudioTimeShift;
bool fCustomChannelMapping;
DWORD pSpeakerToChannelMap[18][18];
bool fAudioNormalize;
bool fAudioNormalizeRecover;
- float AudioBoost;
+ float dAudioBoost;
bool fIntRealMedia;
//bool fRealMediaRenderless;
int iQuickTimeRenderer;
- float RealMediaQuickTimeFPS;
+ //float dRealMediaQuickTimeFPS;
CStringArray m_pnspresets;
@@ -611,28 +612,28 @@ public:
HACCEL hAccel;
bool fWinLirc;
- CString WinLircAddr;
+ CString strWinLircAddr;
CWinLircClient WinLircClient;
bool fUIce;
- CString UIceAddr;
+ CString strUIceAddr;
CUIceClient UIceClient;
bool fGlobalMedia;
- CMediaFormats Formats;
+ CMediaFormats m_Formats;
bool SrcFilters[SRC_LAST];
bool TraFilters[TRA_LAST];
bool DXVAFilters[DXVA_LAST];
bool FFmpegFilters[FFM_LAST];
- CString logofn;
- UINT logoid;
- bool logoext;
+ CString strLogoFileName;
+ UINT nLogoId;
+ bool fLogoExternal;
bool fHideCDROMsSubMenu;
- DWORD priority;
- bool launchfullscreen;
+ DWORD dwPriority;
+ bool fLaunchfullscreen;
BOOL fEnableWebServer;
int nWebServerPort;
@@ -640,13 +641,13 @@ public:
bool fWebServerPrintDebugInfo;
bool fWebServerUseCompression;
bool fWebServerLocalhostOnly;
- CString WebRoot, WebDefIndex;
- CString WebServerCGI;
+ CString strWebRoot, strWebDefIndex;
+ CString strWebServerCGI;
- CString SnapShotPath, SnapShotExt;
- int ThumbRows, ThumbCols, ThumbWidth;
+ CString strSnapShotPath, strSnapShotExt;
+ int iThumbRows, iThumbCols, iThumbWidth;
- CString ISDb;
+ CString strISDb;
struct Shader
{
@@ -655,8 +656,8 @@ public:
CString srcdata;
};
CAtlList<Shader> m_shaders;
- CString m_shadercombine;
- CString m_shadercombineScreenSpace;
+ CString strShadercombine;
+ CString strShadercombineScreenSpace;
// Casimir666 : new settings
bool fD3DFullscreen;
@@ -669,8 +670,8 @@ public:
float dSaturation;
CString strShaderList;
CString strShaderListScreenSpace;
- bool m_bToggleShader;
- bool m_bToggleShaderScreenSpace;
+ bool fToggleShader;
+ bool fToggleShaderScreenSpace;
bool fRememberDVDPos;
bool fRememberFilePos;
@@ -682,23 +683,23 @@ public:
CString strAnalogVideo;
CString strAnalogAudio;
int iAnalogCountry;
- CString BDANetworkProvider;
- CString BDATuner;
- CString BDAReceiver;
- CString BDAStandard;
- int BDAScanFreqStart;
- int BDAScanFreqEnd;
- int BDABandwidth;
- bool BDAUseOffset;
- int BDAOffset;
- bool BDAIgnoreEncryptedChannels;
- int DVBLastChannel;
- CAtlList<CDVBChannel> DVBChannels;
+ CString strBDANetworkProvider;
+ CString strBDATuner;
+ CString strBDAReceiver;
+ //CString strBDAStandard;
+ int iBDAScanFreqStart;
+ int iBDAScanFreqEnd;
+ int iBDABandwidth;
+ bool fBDAUseOffset;
+ int iBDAOffset;
+ bool fBDAIgnoreEncryptedChannels;
+ UINT nDVBLastChannel;
+ CAtlList<CDVBChannel> m_DVBChannels;
HWND hMasterWnd;
- bool IsD3DFullscreen();
- CString SelectedAudioRenderer();
+ bool IsD3DFullscreen() const;
+ CString SelectedAudioRenderer() const;
void ResetPositions();
DVD_POSITION* CurrentDVDPosition();
bool NewDvd(ULONGLONG llDVDGuid);
@@ -708,8 +709,8 @@ public:
void SaveCurrentDVDPosition();
void SaveCurrentFilePosition();
- void DeserializeHex (LPCTSTR strVal, BYTE* pBuffer, int nBufSize);
- CString SerializeHex (BYTE* pBuffer, int nBufSize);
+ void DeserializeHex (LPCTSTR strVal, BYTE* pBuffer, int nBufSize) const;
+ CString SerializeHex (BYTE* pBuffer, int nBufSize) const;
private :
DVD_POSITION DvdPosition[MAX_DVD_POSITION];
@@ -722,7 +723,7 @@ private :
CString DXVAFiltersKeys[DXVA_LAST];
CString FFMFiltersKeys[FFM_LAST];
- __int64 ConvertTimeToMSec(CString& time);
+ __int64 ConvertTimeToMSec(CString& time) const;
void ExtractDVDStartPos(CString& strParam);
void CreateCommands();
@@ -737,17 +738,17 @@ public:
void AddFav(favtype ft, CString s);
CDVBChannel* FindChannelByPref(int nPrefNumber);
- bool m_fPreventMinimize;
- bool m_fUseWin7TaskBar;
- bool m_fExitAfterPlayback;
- bool m_fNextInDirAfterPlayback;
- bool m_fDontUseSearchInFolder;
- int nOSD_Size;
- CString m_OSD_Font;
- CStringW m_subtitlesLanguageOrder;
- CStringW m_audiosLanguageOrder;
-
- int fnChannels;
+ bool fPreventMinimize;
+ bool fUseWin7TaskBar;
+ bool fExitAfterPlayback;
+ bool fNextInDirAfterPlayback;
+ bool fDontUseSearchInFolder;
+ int nOSDSize;
+ CString strOSDFont;
+ CStringW strSubtitlesLanguageOrder;
+ CStringW strAudiosLanguageOrder;
+
+ int nSpeakerChannels;
private:
void UpdateRenderersData(bool fSave);
friend void CRenderersSettings::UpdateData(bool bSave);
diff --git a/src/apps/mplayerc/ChildView.cpp b/src/apps/mplayerc/ChildView.cpp
index 2314edf0f..1c21e0529 100644
--- a/src/apps/mplayerc/ChildView.cpp
+++ b/src/apps/mplayerc/ChildView.cpp
@@ -132,22 +132,22 @@ void CChildView::LoadLogo()
m_logo.Destroy();
- if(s.logoext)
- bHaveLogo = SUCCEEDED(m_logo.Load(s.logofn));
+ if(s.fLogoExternal)
+ bHaveLogo = SUCCEEDED(m_logo.Load(s.strLogoFileName));
if(!bHaveLogo)
{
- s.logoext = 0; // use the built-in logo instead
- s.logofn = ""; // clear logo file name
+ s.fLogoExternal = false; // use the built-in logo instead
+ s.strLogoFileName = ""; // clear logo file name
- if (!m_logo.LoadFromResource(s.logoid)) // try the latest selected build-in logo
- m_logo.LoadFromResource(s.logoid=DEF_LOGO); // if fail then use the default logo, should never fail
+ if (!m_logo.LoadFromResource(s.nLogoId)) // try the latest selected build-in logo
+ m_logo.LoadFromResource(s.nLogoId=DEF_LOGO); // if fail then use the default logo, should never fail
}
if(m_hWnd) Invalidate();
}
-CSize CChildView::GetLogoSize()
+CSize CChildView::GetLogoSize() const
{
CSize ret(0,0);
if(!m_logo.IsNull())
diff --git a/src/apps/mplayerc/ChildView.h b/src/apps/mplayerc/ChildView.h
index ad27d2db7..05cdf8c24 100644
--- a/src/apps/mplayerc/ChildView.h
+++ b/src/apps/mplayerc/ChildView.h
@@ -43,13 +43,13 @@ public:
public:
void SetVideoRect(CRect r = CRect(0,0,0,0));
- CRect GetVideoRect()
+ CRect GetVideoRect() const
{
return(m_vrect);
}
void LoadLogo();
- CSize GetLogoSize();
+ CSize GetLogoSize() const;
protected:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
diff --git a/src/apps/mplayerc/FGManager.cpp b/src/apps/mplayerc/FGManager.cpp
index 02b2756e8..012673ad3 100644
--- a/src/apps/mplayerc/FGManager.cpp
+++ b/src/apps/mplayerc/FGManager.cpp
@@ -2352,10 +2352,10 @@ CFGManagerCustom::CFGManagerCustom(LPCTSTR pName, LPUNKNOWN pUnk)
WORD merit_low = 1;
- POSITION pos = s.filters.GetTailPosition();
+ POSITION pos = s.m_filters.GetTailPosition();
while(pos)
{
- FilterOverride* fo = s.filters.GetPrev(pos);
+ FilterOverride* fo = s.m_filters.GetPrev(pos);
if (!fo->fDisabled && fo->name == _T("Broadcom Video Decoder"))
bOverrideBroadcom = true;
@@ -2442,8 +2442,8 @@ STDMETHODIMP CFGManagerCustom::AddFilter(IBaseFilter* pBF, LPCWSTR pName)
{
pASF->EnableDownSamplingTo441(s.fDownSampleTo441);
pASF->SetSpeakerConfig(s.fCustomChannelMapping, s.pSpeakerToChannelMap);
- pASF->SetAudioTimeShift(s.fAudioTimeShift ? 10000i64*s.tAudioTimeShift : 0);
- pASF->SetNormalizeBoost(s.fAudioNormalize, s.fAudioNormalizeRecover, s.AudioBoost);
+ pASF->SetAudioTimeShift(s.fAudioTimeShift ? 10000i64*s.iAudioTimeShift : 0);
+ pASF->SetNormalizeBoost(s.fAudioNormalize, s.fAudioNormalizeRecover, s.dAudioBoost);
}
return hr;
diff --git a/src/apps/mplayerc/FGManagerBDA.cpp b/src/apps/mplayerc/FGManagerBDA.cpp
index 028e00b91..7de7482ef 100644
--- a/src/apps/mplayerc/FGManagerBDA.cpp
+++ b/src/apps/mplayerc/FGManagerBDA.cpp
@@ -416,18 +416,18 @@ STDMETHODIMP CFGManagerBDA::RenderFile(LPCWSTR lpcwstrFile, LPCWSTR lpcwstrPlayL
CComPtr<IBaseFilter> pReceiver;
LOG (_T("\nCreating BDA filters..."));
- CheckAndLog (CreateKSFilter (&pNetwork, KSCATEGORY_BDA_NETWORK_PROVIDER, s.BDANetworkProvider), "BDA : Network provider creation");
-// CheckAndLog (CreateKSFilter (&pTuner, KSCATEGORY_BDA_NETWORK_TUNER, s.BDATuner), "BDA : Network tuner creation");
- if (FAILED(hr = CreateKSFilter (&pTuner, KSCATEGORY_BDA_NETWORK_TUNER, s.BDATuner)))
+ CheckAndLog (CreateKSFilter (&pNetwork, KSCATEGORY_BDA_NETWORK_PROVIDER, s.strBDANetworkProvider), "BDA : Network provider creation");
+// CheckAndLog (CreateKSFilter (&pTuner, KSCATEGORY_BDA_NETWORK_TUNER, s.strBDATuner), "BDA : Network tuner creation");
+ if (FAILED(hr = CreateKSFilter (&pTuner, KSCATEGORY_BDA_NETWORK_TUNER, s.strBDATuner)))
{
AfxMessageBox(_T("BDA Error: could not create Network tuner. "), MB_OK);
TRACE("BDA : Network tuner creation"" :0x%08x\n",hr);
return hr;
}
- if (s.BDATuner.Right(40) != s.BDAReceiver.Right(40)) // check if filters are the same
+ if (s.strBDATuner.Right(40) != s.strBDAReceiver.Right(40)) // check if filters are the same
{
-// CheckAndLog (CreateKSFilter (&pReceiver, KSCATEGORY_BDA_RECEIVER_COMPONENT, s.BDAReceiver), "BDA : Receiver creation");
- if (FAILED(hr = CreateKSFilter (&pReceiver, KSCATEGORY_BDA_RECEIVER_COMPONENT, s.BDAReceiver)))
+// CheckAndLog (CreateKSFilter (&pReceiver, KSCATEGORY_BDA_RECEIVER_COMPONENT, s.strBDAReceiver), "BDA : Receiver creation");
+ if (FAILED(hr = CreateKSFilter (&pReceiver, KSCATEGORY_BDA_RECEIVER_COMPONENT, s.strBDAReceiver)))
{
AfxMessageBox(_T("BDA Error: could not create Network receiver."), MB_OK);
TRACE("BDA : Receiver creation"" :0x%08x\n",hr);
@@ -542,7 +542,7 @@ STDMETHODIMP CFGManagerBDA::SetChannel (int nChannelPrefNumber)
hr = SetChannelInternal (pChannel);
if (SUCCEEDED (hr))
- s.DVBLastChannel = nChannelPrefNumber;
+ s.nDVBLastChannel = nChannelPrefNumber;
}
return hr;
@@ -561,7 +561,7 @@ STDMETHODIMP CFGManagerBDA::SetFrequency(ULONG freq)
CheckPointer (m_pBDAFreq, E_FAIL);
CheckAndLog (m_pBDAControl->StartChanges(), "BDA : Setfrequency StartChanges");
- CheckAndLog (m_pBDAFreq->put_Bandwidth(s.BDABandwidth), "BDA : Setfrequency put_Bandwidth");
+ CheckAndLog (m_pBDAFreq->put_Bandwidth(s.iBDABandwidth), "BDA : Setfrequency put_Bandwidth");
CheckAndLog (m_pBDAFreq->put_Frequency(freq), "BDA : Setfrequency put_Frequency");
CheckAndLog (m_pBDAControl->CheckChanges(), "BDA : Setfrequency CheckChanges");
CheckAndLog (m_pBDAControl->CommitChanges(), "BDA : Setfrequency CommitChanges");
@@ -607,7 +607,7 @@ STDMETHODIMP CFGManagerBDA::Count(DWORD* pcStreams)
{
CheckPointer(pcStreams, E_POINTER);
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
*pcStreams = 0;
@@ -621,7 +621,7 @@ STDMETHODIMP CFGManagerBDA::Enable(long lIndex, DWORD dwFlags)
{
HRESULT hr = E_INVALIDARG;
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
DVBStreamInfo* pStreamInfo = NULL;
CDVBStream* pStream = NULL;
FILTER_STATE nState;
@@ -662,7 +662,7 @@ STDMETHODIMP CFGManagerBDA::Info(long lIndex, AM_MEDIA_TYPE** ppmt, DWORD* pdwFl
{
HRESULT hr = E_INVALIDARG;
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
DVBStreamInfo* pStreamInfo = NULL;
CDVBStream* pStream = NULL;
CDVBStream* pCurrentStream = NULL;
@@ -856,7 +856,7 @@ HRESULT CFGManagerBDA::UpdatePSI(PresentFollowing &NowNext)
{
HRESULT hr = S_FALSE;
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
CMpeg2DataParser Parser (m_DVBStreams[DVB_PSI].GetFilter());
if (pChannel->GetNowNextFlag())
diff --git a/src/apps/mplayerc/ISDb.cpp b/src/apps/mplayerc/ISDb.cpp
index 2b00f7b5a..b5111dc9d 100644
--- a/src/apps/mplayerc/ISDb.cpp
+++ b/src/apps/mplayerc/ISDb.cpp
@@ -55,7 +55,7 @@ void hash(CPlaylist& pl, CList<filehash>& fhs)
while(pos)
{
CString fn = pl.GetNext(pos).m_fns.GetHead();
- if(AfxGetAppSettings().Formats.FindExt(CPath(fn).GetExtension().MakeLower(), true))
+ if(AfxGetAppSettings().m_Formats.FindExt(CPath(fn).GetExtension().MakeLower(), true))
continue;
filehash fh;
diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp
index 43506f920..3fbd51efd 100644
--- a/src/apps/mplayerc/MainFrm.cpp
+++ b/src/apps/mplayerc/MainFrm.cpp
@@ -784,8 +784,8 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
}
}
- m_bToggleShader = s.m_bToggleShader;
- m_bToggleShaderScreenSpace = s.m_bToggleShaderScreenSpace;
+ m_bToggleShader = s.fToggleShader;
+ m_bToggleShaderScreenSpace = s.fToggleShaderScreenSpace;
#ifdef _WIN64
m_strTitle.Format (L"%s x64 - v%s", ResStr(IDR_MAINFRAME), AfxGetMyApp()->m_strVersion);
@@ -859,8 +859,8 @@ void CMainFrame::OnClose()
s.strShaderListScreenSpace = strList;
}
- s.m_bToggleShader = m_bToggleShader;
- s.m_bToggleShaderScreenSpace = m_bToggleShaderScreenSpace;
+ s.fToggleShader = m_bToggleShader;
+ s.fToggleShaderScreenSpace = m_bToggleShaderScreenSpace;
m_wndPlaylistBar.SavePlaylist();
@@ -1392,7 +1392,7 @@ void CMainFrame::OnSize(UINT nType, int cx, int cy)
AppSettings& s = AfxGetAppSettings();
if(nType != SIZE_MAXIMIZED && nType != SIZE_MINIMIZED)
GetWindowRect(s.rcLastWindowPos);
- s.lastWindowType = nType;
+ s.nLastWindowType = nType;
}
}
@@ -2240,7 +2240,7 @@ bool CMainFrame::DoAfterPlaybackEvent()
bool fExit = false;
- if(s.nCLSwitches&CLSW_CLOSE || s.m_fExitAfterPlayback)
+ if(s.nCLSwitches&CLSW_CLOSE || s.fExitAfterPlayback)
{
fExit = true;
}
@@ -2320,11 +2320,11 @@ bool CMainFrame::GraphEventComplete( )
else
{
int NextMediaExist = 0;
- if (s.m_fNextInDirAfterPlayback)
+ if (s.fNextInDirAfterPlayback)
{
NextMediaExist = SearchInDir(true);
}
- if (!s.m_fNextInDirAfterPlayback || !(NextMediaExist>1))
+ if (!s.fNextInDirAfterPlayback || !(NextMediaExist>1))
{
if(s.fRewind)
SendMessage(WM_COMMAND, ID_PLAY_STOP);
@@ -2338,7 +2338,7 @@ bool CMainFrame::GraphEventComplete( )
if(m_fFullScreen && s.fExitFullScreenAtTheEnd)
OnViewFullscreen();
}
- if (s.m_fNextInDirAfterPlayback && !NextMediaExist)
+ if (s.fNextInDirAfterPlayback && !NextMediaExist)
{
m_OSD.DisplayMessage(OSD_TOPLEFT, ResStr(IDS_NO_MORE_MEDIA));
// Don't move it. Else OSD message "Pause" will rewrite this message.
@@ -2477,12 +2477,12 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
Domain = _T("First Play");
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
if (pDVDI && SUCCEEDED (pDVDI->GetDiscID (NULL, &llDVDGuid)))
{
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("DVD Title: %d"), s.lDVDTitle);
if (s.lDVDTitle != 0)
@@ -2490,7 +2490,7 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
s.NewDvd (llDVDGuid);
// Set command line position
hr = pDVDC->PlayTitle(s.lDVDTitle, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
{
m_OSD.DebugMessage(_T("PlayTitle: 0x%08X"), hr);
m_OSD.DebugMessage(_T("DVD Chapter: %d"), s.lDVDChapter);
@@ -2499,14 +2499,14 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
if (s.lDVDChapter > 1)
{
hr = pDVDC->PlayChapterInTitle(s.lDVDTitle, s.lDVDChapter, DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayChapterInTitle: 0x%08X"), hr);
}
else
{
// Trick: skip trailers with some DVDs
hr = pDVDC->Resume(DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("Resume: 0x%08X"), hr);
// If the resume call succeeded, then we skip PlayChapterInTitle
@@ -2516,12 +2516,12 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
// This might fail if the Title is not available yet?
hr = pDVDC->PlayAtTime(&s.DVDPosition,
DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayAtTime: 0x%08X"), hr);
}
else
{
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("Timecode requested: %02d:%02d:%02d.%03d"),
s.DVDPosition.bHours, s.DVDPosition.bMinutes,
s.DVDPosition.bSeconds, s.DVDPosition.bFrames);
@@ -2529,27 +2529,27 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
// Always play chapter 1 (for now, until something else dumb happens)
hr = pDVDC->PlayChapterInTitle(s.lDVDTitle, 1,
DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayChapterInTitle: 0x%08X"), hr);
// This might fail if the Title is not available yet?
hr = pDVDC->PlayAtTime(&s.DVDPosition,
DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayAtTime: 0x%08X"), hr);
if ( hr != S_OK )
{
hr = pDVDC->PlayAtTimeInTitle(s.lDVDTitle, &s.DVDPosition,
DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayAtTimeInTitle: 0x%08X"), hr);
}
} // Resume
hr = pDVDC->PlayAtTime(&s.DVDPosition,
DVD_CMD_FLAG_Block|DVD_CMD_FLAG_Flush, NULL);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("PlayAtTime: %d"), hr);
}
@@ -2580,17 +2580,17 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
break;
case DVD_DOMAIN_VideoManagerMenu:
Domain = _T("Video Manager Menu");
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
break;
case DVD_DOMAIN_VideoTitleSetMenu:
Domain = _T("Video Title Set Menu");
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
break;
case DVD_DOMAIN_Title:
Domain.Format(ResStr(IDS_AG_TITLE), m_iDVDTitle);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
DVD_POSITION* DvdPos;
DvdPos = s.CurrentDVDPosition();
@@ -2599,12 +2599,12 @@ LRESULT CMainFrame::OnGraphNotify(WPARAM wParam, LPARAM lParam)
break;
case DVD_DOMAIN_Stop:
Domain = ResStr(IDS_AG_STOP);
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
break;
default:
Domain = _T("-");
- if ( s.ShowDebugInfo )
+ if ( s.fShowDebugInfo )
m_OSD.DebugMessage(_T("%s"), Domain);
break;
}
@@ -3441,7 +3441,7 @@ void CMainFrame::OnUpdatePlayerStatus(CCmdUI* pCmdUI)
if(m_iMediaLoadState == MLS_LOADING)
{
pCmdUI->SetText(ResStr(IDS_CONTROLS_OPENING));
- if((AfxGetAppSettings().m_fUseWin7TaskBar) && (m_pTaskbarList)) m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
+ if((AfxGetAppSettings().fUseWin7TaskBar) && (m_pTaskbarList)) m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
}
else if(m_iMediaLoadState == MLS_LOADED)
{
@@ -3583,7 +3583,7 @@ void CMainFrame::OnUpdatePlayerStatus(CCmdUI* pCmdUI)
else if(m_iMediaLoadState == MLS_CLOSING)
{
pCmdUI->SetText(ResStr(IDS_CONTROLS_CLOSING));
- if((AfxGetAppSettings().m_fUseWin7TaskBar) && (m_pTaskbarList)) m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
+ if((AfxGetAppSettings().fUseWin7TaskBar) && (m_pTaskbarList)) m_pTaskbarList->SetProgressState(m_hWnd, TBPF_INDETERMINATE);
}
else
{
@@ -3650,16 +3650,16 @@ void CMainFrame::OnFilePostOpenmedia()
}
// Waffs : PnS command line
- if(!s.sPnSPreset.IsEmpty())
+ if(!s.strPnSPreset.IsEmpty())
{
for(int i = 0; i < s.m_pnspresets.GetCount(); i++)
{
int j = 0;
CString str = s.m_pnspresets[i];
CString label = str.Tokenize(_T(","), j);
- if(s.sPnSPreset == label) OnViewPanNScanPresets(i+ID_PANNSCAN_PRESETS_START);
+ if(s.strPnSPreset == label) OnViewPanNScanPresets(i+ID_PANNSCAN_PRESETS_START);
}
- s.sPnSPreset.Empty();
+ s.strPnSPreset.Empty();
}
SendNowPlayingToMSN();
SendNowPlayingTomIRC();
@@ -4080,7 +4080,7 @@ void CMainFrame::OnFileOpenQuick()
CString filter;
CAtlArray<CString> mask;
- AfxGetAppSettings().Formats.GetFilter(filter, mask);
+ AfxGetAppSettings().m_Formats.GetFilter(filter, mask);
COpenFileDlg fd(mask, true, NULL, NULL,
OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY,
filter, GetModalParent());
@@ -4226,10 +4226,10 @@ BOOL CMainFrame::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCDS)
bool fFound = false;
- POSITION pos2 = s.filters.GetHeadPosition();
+ POSITION pos2 = s.m_filters.GetHeadPosition();
while(pos2)
{
- FilterOverride* f2 = s.filters.GetNext(pos2);
+ FilterOverride* f2 = s.m_filters.GetNext(pos2);
if(f2->type == FilterOverride::EXTERNAL && !f2->path.CompareNoCase(f->path))
{
fFound = true;
@@ -4240,7 +4240,7 @@ BOOL CMainFrame::OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCDS)
if(!fFound)
{
CAutoPtr<FilterOverride> p(f);
- s.filters.AddHead(p);
+ s.m_filters.AddHead(p);
}
}
}
@@ -4375,7 +4375,7 @@ int CALLBACK BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lp, LPARAM pData)
{
case BFFM_INITIALIZED:
//Initial directory is set here
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE,(LPARAM)(LPCTSTR)AfxGetAppSettings().sDVDPath);
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE,(LPARAM)(LPCTSTR)AfxGetAppSettings().strDVDPath);
break;
default:
break;
@@ -4399,9 +4399,9 @@ void CMainFrame::OnFileOpendvd()
if(p)
{
AppSettings& s = AfxGetAppSettings();
- if(s.fUseDVDPath && !s.sDVDPath.IsEmpty())
+ if(s.fUseDVDPath && !s.strDVDPath.IsEmpty())
{
- p->path = s.sDVDPath;
+ p->path = s.strDVDPath;
p->path.Replace('/', '\\');
if(p->path[p->path.GetLength()-1] != '\\') p->path += '\\';
}
@@ -4430,7 +4430,7 @@ void CMainFrame::OnFileOpendvd()
CString strPlaylistFile;
CAtlList<CHdmvClipInfo::PlaylistItem> MainPlaylist;
SHGetPathFromIDList(iil, path);
- s.sDVDPath = path;
+ s.strDVDPath = path;
if (SUCCEEDED (ClipInfo.FindMainMovie (path, strPlaylistFile, MainPlaylist)))
{
@@ -4925,11 +4925,11 @@ void CMainFrame::SaveThumbnails(LPCTSTR fn)
AppSettings& s = AfxGetAppSettings();
- int cols = max (1, min (8, s.ThumbCols)), rows = max(1, min (8, s.ThumbRows));
+ int cols = max (1, min (8, s.iThumbCols)), rows = max(1, min (8, s.iThumbRows));
int margin = 5;
int infoheight = 70;
- int width = max (256, min (2048, s.ThumbWidth));
+ int width = max (256, min (2048, s.iThumbWidth));
int height = width * video.cy / video.cx * rows / cols + infoheight;
int dibsize = sizeof(BITMAPINFOHEADER) + width*height*4;
@@ -5151,7 +5151,7 @@ static CString MakeSnapshotFileName(LPCTSTR prefix)
{
CTime t = CTime::GetCurrentTime();
CString fn;
- fn.Format(_T("%s_[%s]%s"), prefix, t.Format(_T("%Y.%m.%d_%H.%M.%S")), AfxGetAppSettings().SnapShotExt);
+ fn.Format(_T("%s_[%s]%s"), prefix, t.Format(_T("%Y.%m.%d_%H.%M.%S")), AfxGetAppSettings().strSnapShotExt);
return fn;
}
@@ -5229,7 +5229,7 @@ void CMainFrame::OnFileSaveImage()
return;
}
- CPath psrc(s.SnapShotPath);
+ CPath psrc(s.strSnapShotPath);
CStringW prefix = _T("snapshot");
if(GetPlaybackMode() == PM_FILE)
@@ -5243,31 +5243,31 @@ void CMainFrame::OnFileSaveImage()
prefix = _T("snapshot_dvd");
prefix.Format(_T("snapshot_dvd_%s"), GetVidPos());
}
- psrc.Combine(s.SnapShotPath, MakeSnapshotFileName(prefix));
+ psrc.Combine(s.strSnapShotPath, MakeSnapshotFileName(prefix));
CFileDialog fd(FALSE, 0, (LPCTSTR)psrc,
OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
_T("BMP - Windows Bitmap (*.bmp)|*.bmp|JPG - JPEG Image (*.jpg)|*.jpg|PNG - Portable Network Graphics (*.png)|*.png||"), GetModalParent(), 0);
- if(s.SnapShotExt == _T(".bmp")) fd.m_pOFN->nFilterIndex = 1;
- else if(s.SnapShotExt == _T(".jpg")) fd.m_pOFN->nFilterIndex = 2;
- else if(s.SnapShotExt == _T(".png")) fd.m_pOFN->nFilterIndex = 3;
+ if(s.strSnapShotExt == _T(".bmp")) fd.m_pOFN->nFilterIndex = 1;
+ else if(s.strSnapShotExt == _T(".jpg")) fd.m_pOFN->nFilterIndex = 2;
+ else if(s.strSnapShotExt == _T(".png")) fd.m_pOFN->nFilterIndex = 3;
if(fd.DoModal() != IDOK) return;
- if(fd.m_pOFN->nFilterIndex == 1) s.SnapShotExt = _T(".bmp");
- else if(fd.m_pOFN->nFilterIndex == 2) s.SnapShotExt = _T(".jpg");
+ if(fd.m_pOFN->nFilterIndex == 1) s.strSnapShotExt = _T(".bmp");
+ else if(fd.m_pOFN->nFilterIndex == 2) s.strSnapShotExt = _T(".jpg");
else
{
fd.m_pOFN->nFilterIndex = 3;
- s.SnapShotExt = _T(".png");
+ s.strSnapShotExt = _T(".png");
}
CPath pdst(fd.GetPathName());
- if(pdst.GetExtension().MakeLower() != s.SnapShotExt) pdst.RenameExtension(s.SnapShotExt);
+ if(pdst.GetExtension().MakeLower() != s.strSnapShotExt) pdst.RenameExtension(s.strSnapShotExt);
CString path = (LPCTSTR)pdst;
pdst.RemoveFileSpec();
- s.SnapShotPath = (LPCTSTR)pdst;
+ s.strSnapShotPath = (LPCTSTR)pdst;
SaveImage(path);
}
@@ -5295,7 +5295,7 @@ void CMainFrame::OnFileSaveImageAuto()
}
CString fn;
- fn.Format(_T("%s\\%s"), s.SnapShotPath, MakeSnapshotFileName(prefix));
+ fn.Format(_T("%s\\%s"), s.strSnapShotPath, MakeSnapshotFileName(prefix));
SaveImage(fn);
}
@@ -5315,7 +5315,7 @@ void CMainFrame::OnFileSaveThumbnails()
return;
}
- CPath psrc(s.SnapShotPath);
+ CPath psrc(s.strSnapShotPath);
CStringW prefix = _T("thumbs");
if(GetPlaybackMode() == PM_FILE)
{
@@ -5323,36 +5323,36 @@ void CMainFrame::OnFileSaveThumbnails()
path.StripPath();
prefix.Format(_T("%s_thumbs"), path);
}
- psrc.Combine(s.SnapShotPath, MakeSnapshotFileName(prefix));
+ psrc.Combine(s.strSnapShotPath, MakeSnapshotFileName(prefix));
CSaveThumbnailsDialog fd(
- s.ThumbRows, s.ThumbCols, s.ThumbWidth,
+ s.iThumbRows, s.iThumbCols, s.iThumbWidth,
0, (LPCTSTR)psrc,
_T("BMP - Windows Bitmap (*.bmp)|*.bmp|JPG - JPEG Image (*.jpg)|*.jpg|PNG - Portable Network Graphics (*.png)|*.png||"), GetModalParent());
- if(s.SnapShotExt == _T(".bmp")) fd.m_pOFN->nFilterIndex = 1;
- else if(s.SnapShotExt == _T(".jpg")) fd.m_pOFN->nFilterIndex = 2;
- else if(s.SnapShotExt == _T(".png")) fd.m_pOFN->nFilterIndex = 3;
+ if(s.strSnapShotExt == _T(".bmp")) fd.m_pOFN->nFilterIndex = 1;
+ else if(s.strSnapShotExt == _T(".jpg")) fd.m_pOFN->nFilterIndex = 2;
+ else if(s.strSnapShotExt == _T(".png")) fd.m_pOFN->nFilterIndex = 3;
if(fd.DoModal() != IDOK) return;
- if(fd.m_pOFN->nFilterIndex == 1) s.SnapShotExt = _T(".bmp");
- else if(fd.m_pOFN->nFilterIndex == 2) s.SnapShotExt = _T(".jpg");
+ if(fd.m_pOFN->nFilterIndex == 1) s.strSnapShotExt = _T(".bmp");
+ else if(fd.m_pOFN->nFilterIndex == 2) s.strSnapShotExt = _T(".jpg");
else
{
fd.m_pOFN->nFilterIndex = 3;
- s.SnapShotExt = _T(".png");
+ s.strSnapShotExt = _T(".png");
}
- s.ThumbRows = fd.m_rows;
- s.ThumbCols = fd.m_cols;
- s.ThumbWidth = fd.m_width;
+ s.iThumbRows = fd.m_rows;
+ s.iThumbCols = fd.m_cols;
+ s.iThumbWidth = fd.m_width;
CPath pdst(fd.GetPathName());
- if(pdst.GetExtension().MakeLower() != s.SnapShotExt) pdst.RenameExtension(s.SnapShotExt);
+ if(pdst.GetExtension().MakeLower() != s.strSnapShotExt) pdst.RenameExtension(s.strSnapShotExt);
CString path = (LPCTSTR)pdst;
pdst.RemoveFileSpec();
- s.SnapShotPath = (LPCTSTR)pdst;
+ s.strSnapShotPath = (LPCTSTR)pdst;
SaveThumbnails(path);
}
@@ -5493,7 +5493,7 @@ void CMainFrame::OnUpdateFileSavesubtitle(CCmdUI* pCmdUI)
void CMainFrame::OnFileISDBSearch()
{
- CStringA url = "http://" + AfxGetAppSettings().ISDb + "/index.php?";
+ CStringA url = "http://" + AfxGetAppSettings().strISDb + "/index.php?";
CStringA args = makeargs(m_wndPlaylistBar.m_pl);
ShellExecute(m_hWnd, _T("open"), CString(url+args), NULL, NULL, SW_SHOWDEFAULT);
}
@@ -5505,7 +5505,7 @@ void CMainFrame::OnUpdateFileISDBSearch(CCmdUI *pCmdUI)
void CMainFrame::OnFileISDBUpload()
{
- CStringA url = "http://" + AfxGetAppSettings().ISDb + "/ul.php?";
+ CStringA url = "http://" + AfxGetAppSettings().strISDb + "/ul.php?";
CStringA args = makeargs(m_wndPlaylistBar.m_pl);
ShellExecute(m_hWnd, _T("open"), CString(url+args), NULL, NULL, SW_SHOWDEFAULT);
}
@@ -5527,7 +5527,7 @@ void CMainFrame::OnFileISDBDownload()
// TODO: put this on a worker thread
- CStringA url = "http://" + s.ISDb + "/index.php?";
+ CStringA url = "http://" + s.strISDb + "/index.php?";
CStringA args;
args.Format("player=mpc&name[0]=%s&size[0]=%016I64x&hash[0]=%016I64x",
UrlEncode(CStringA(fh.name)), fh.size, fh.hash);
@@ -5602,7 +5602,7 @@ void CMainFrame::OnFileISDBDownload()
{
isdb_subtitle& sub = dlg.m_selsubs.GetNext(pos);
- CStringA url = "http://" + s.ISDb + "/dl.php?";
+ CStringA url = "http://" + s.strISDb + "/dl.php?";
CStringA args;
args.Format("id=%d&ticket=%s", sub.id, UrlEncode(ticket));
@@ -6504,8 +6504,8 @@ void CMainFrame::OnUpdateFileClose(CCmdUI* pCmdUI)
void CMainFrame::OnViewCaptionmenu()
{
AppSettings& s = AfxGetAppSettings();
- s.fCaptionMenuMode++;
- s.fCaptionMenuMode %= MODE_COUNT; // three states: normal->borderless->frame only->
+ s.iCaptionMenuMode++;
+ s.iCaptionMenuMode %= MODE_COUNT; // three states: normal->borderless->frame only->
if ( m_fFullScreen )
return;
@@ -6516,7 +6516,7 @@ void CMainFrame::OnViewCaptionmenu()
CRect wr;
GetWindowRect( &wr );
- switch(s.fCaptionMenuMode)
+ switch(s.iCaptionMenuMode)
{
case MODE_BORDERLESS : // normal -> borderless
dwRemove = WS_CAPTION | WS_THICKFRAME;
@@ -6549,7 +6549,7 @@ void CMainFrame::OnViewCaptionmenu()
void CMainFrame::OnUpdateViewCaptionmenu(CCmdUI* pCmdUI)
{
static int NEXT_MODE[] = {IDS_VIEW_CAPTIONMENU_NONE, IDS_VIEW_CAPTIONMENU_FRAME, IDS_VIEW_CAPTIONMENU_SHOW};
- int idx = (AfxGetAppSettings().fCaptionMenuMode %= MODE_COUNT);
+ int idx = (AfxGetAppSettings().iCaptionMenuMode %= MODE_COUNT);
pCmdUI->SetText(ResStr(NEXT_MODE[idx]));
}
@@ -6701,7 +6701,7 @@ void CMainFrame::OnUpdateViewShaderEditor(CCmdUI* pCmdUI)
void CMainFrame::OnViewMinimal()
{
- while(AfxGetAppSettings().fCaptionMenuMode!=MODE_BORDERLESS)
+ while(AfxGetAppSettings().iCaptionMenuMode!=MODE_BORDERLESS)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
ShowControls(CS_NONE);
}
@@ -6712,7 +6712,7 @@ void CMainFrame::OnUpdateViewMinimal(CCmdUI* pCmdUI)
void CMainFrame::OnViewCompact()
{
- while(AfxGetAppSettings().fCaptionMenuMode!=MODE_FRAMEONLY)
+ while(AfxGetAppSettings().iCaptionMenuMode!=MODE_FRAMEONLY)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
ShowControls(CS_TOOLBAR);
}
@@ -6723,7 +6723,7 @@ void CMainFrame::OnUpdateViewCompact(CCmdUI* pCmdUI)
void CMainFrame::OnViewNormal()
{
- while(AfxGetAppSettings().fCaptionMenuMode!=MODE_SHOWCAPTIONMENU)
+ while(AfxGetAppSettings().iCaptionMenuMode!=MODE_SHOWCAPTIONMENU)
SendMessage(WM_COMMAND, ID_VIEW_CAPTIONMENU);
ShowControls(CS_SEEKBAR|CS_TOOLBAR|CS_STATUSBAR|CS_INFOBAR);
}
@@ -7036,7 +7036,7 @@ const static SIZE s_ar[] = {{0,0}, {4,3}, {5,4}, {16,9}, {235,100}, {185,100}};
void CMainFrame::OnViewAspectRatio(UINT nID)
{
- CSize& ar = AfxGetAppSettings().AspectRatio;
+ CSize& ar = AfxGetAppSettings().sizeAspectRatio;
ar = s_ar[nID - ID_ASPECTRATIO_START];
@@ -7052,13 +7052,13 @@ void CMainFrame::OnViewAspectRatio(UINT nID)
void CMainFrame::OnUpdateViewAspectRatio(CCmdUI* pCmdUI)
{
- pCmdUI->SetRadio(AfxGetAppSettings().AspectRatio == s_ar[pCmdUI->m_nID - ID_ASPECTRATIO_START]);
+ pCmdUI->SetRadio(AfxGetAppSettings().sizeAspectRatio == s_ar[pCmdUI->m_nID - ID_ASPECTRATIO_START]);
pCmdUI->Enable(m_iMediaLoadState == MLS_LOADED && !m_fAudioOnly);
}
void CMainFrame::OnViewAspectRatioNext()
{
- CSize& ar = AfxGetAppSettings().AspectRatio;
+ CSize& ar = AfxGetAppSettings().sizeAspectRatio;
UINT nID = ID_ASPECTRATIO_START;
@@ -7133,7 +7133,7 @@ void CMainFrame::OnPlayPlay()
CComQIPtr<IBDATuner> pTun = pGB;
if (pTun)
{
- pTun->SetChannel (AfxGetAppSettings().DVBLastChannel);
+ pTun->SetChannel (AfxGetAppSettings().nDVBLastChannel);
DisplayCurrentChannelOSD();
}
}
@@ -8179,7 +8179,7 @@ void CMainFrame::OnPlayVolumeBoost(UINT nID)
{
AppSettings& s = AfxGetAppSettings();
- int i = (int)(50.0f*log10(s.AudioBoost));
+ int i = (int)(50.0f*log10(s.dAudioBoost));
switch(nID)
{
@@ -8197,14 +8197,14 @@ void CMainFrame::OnPlayVolumeBoost(UINT nID)
break;
}
- s.AudioBoost = pow(10.0f, (float)i/50);
+ s.dAudioBoost = pow(10.0f, (float)i/50);
if(CComQIPtr<IAudioSwitcherFilter> pASF = FindFilter(__uuidof(CAudioSwitcherFilter), pGB))
{
bool fNormalize, fNormalizeRecover;
float boost;
pASF->GetNormalizeBoost(fNormalize, fNormalizeRecover, boost);
- pASF->SetNormalizeBoost(fNormalize, fNormalizeRecover, s.AudioBoost);
+ pASF->SetNormalizeBoost(fNormalize, fNormalizeRecover, s.dAudioBoost);
}
}
@@ -8222,16 +8222,16 @@ void CMainFrame::OnAfterplayback(UINT nID)
switch(nID)
{
case ID_AFTERPLAYBACK_NEXT :
- s.m_fNextInDirAfterPlayback = true;
- s.m_fExitAfterPlayback = false;
+ s.fNextInDirAfterPlayback = true;
+ s.fExitAfterPlayback = false;
break;
case ID_AFTERPLAYBACK_EXIT :
- s.m_fExitAfterPlayback = true;
- s.m_fNextInDirAfterPlayback = false;
+ s.fExitAfterPlayback = true;
+ s.fNextInDirAfterPlayback = false;
break;
case ID_AFTERPLAYBACK_DONOTHING:
- s.m_fExitAfterPlayback = false;
- s.m_fNextInDirAfterPlayback = false;
+ s.fExitAfterPlayback = false;
+ s.fNextInDirAfterPlayback = false;
break;
case ID_AFTERPLAYBACK_CLOSE:
s.nCLSwitches |= CLSW_CLOSE;
@@ -8260,10 +8260,10 @@ void CMainFrame::OnUpdateAfterplayback(CCmdUI* pCmdUI)
switch(pCmdUI->m_nID)
{
case ID_AFTERPLAYBACK_EXIT:
- fChecked = !!s.m_fExitAfterPlayback;
+ fChecked = !!s.fExitAfterPlayback;
break;
case ID_AFTERPLAYBACK_NEXT:
- fChecked = !!s.m_fNextInDirAfterPlayback;
+ fChecked = !!s.fNextInDirAfterPlayback;
break;
case ID_AFTERPLAYBACK_CLOSE:
fChecked = !!(s.nCLSwitches & CLSW_CLOSE);
@@ -8281,7 +8281,7 @@ void CMainFrame::OnUpdateAfterplayback(CCmdUI* pCmdUI)
fChecked = !!(s.nCLSwitches & CLSW_LOGOFF);
break;
case ID_AFTERPLAYBACK_DONOTHING:
- fChecked = (!s.m_fExitAfterPlayback) && (!s.m_fNextInDirAfterPlayback);
+ fChecked = (!s.fExitAfterPlayback) && (!s.fNextInDirAfterPlayback);
break;
}
@@ -8338,7 +8338,7 @@ void CMainFrame::OnNavigateSkip(UINT nID)
else if(nID == ID_NAVIGATE_SKIPFORWARD)
SendMessage(WM_COMMAND, ID_NAVIGATE_SKIPFORWARDPLITEM);
}
- else if ((m_wndPlaylistBar.GetCount() == 1) && !AfxGetAppSettings().m_fDontUseSearchInFolder)
+ else if ((m_wndPlaylistBar.GetCount() == 1) && !AfxGetAppSettings().fDontUseSearchInFolder)
{
if(nID == ID_NAVIGATE_SKIPBACK)
{
@@ -8439,7 +8439,7 @@ void CMainFrame::OnNavigateSkip(UINT nID)
int nCurrentChannel;
AppSettings& s = AfxGetAppSettings();
- nCurrentChannel = s.DVBLastChannel;
+ nCurrentChannel = s.nDVBLastChannel;
if(nID == ID_NAVIGATE_SKIPBACK)
{
@@ -8471,8 +8471,8 @@ void CMainFrame::OnUpdateNavigateSkip(CCmdUI* pCmdUI)
&& ((GetPlaybackMode() == PM_DVD
&& m_iDVDDomain != DVD_DOMAIN_VideoManagerMenu
&& m_iDVDDomain != DVD_DOMAIN_VideoTitleSetMenu)
- || (GetPlaybackMode() == PM_FILE && !AfxGetAppSettings().m_fDontUseSearchInFolder)
- || (GetPlaybackMode() == PM_FILE && AfxGetAppSettings().m_fDontUseSearchInFolder && (m_wndPlaylistBar.GetCount() > 1 || m_pCB->ChapGetCount() > 1))
+ || (GetPlaybackMode() == PM_FILE && !AfxGetAppSettings().fDontUseSearchInFolder)
+ || (GetPlaybackMode() == PM_FILE && AfxGetAppSettings().fDontUseSearchInFolder && (m_wndPlaylistBar.GetCount() > 1 || m_pCB->ChapGetCount() > 1))
|| (GetPlaybackMode() == PM_CAPTURE && !m_fCapturing)));
}
@@ -8680,7 +8680,7 @@ void CMainFrame::OnNavigateChapters(UINT nID)
CComQIPtr<IBDATuner> pTun = pGB;
if (pTun)
{
- if (s.DVBLastChannel != nID)
+ if (s.nDVBLastChannel != nID)
{
pTun->SetChannel (nID);
DisplayCurrentChannelOSD();
@@ -9257,8 +9257,8 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
if(s.HasFixedWindowSize())
{
- w = s.fixedWindowSize.cx;
- h = s.fixedWindowSize.cy;
+ w = s.sizeFixedWindow.cx;
+ h = s.sizeFixedWindow.cy;
}
else if(s.fRememberWindowSize)
{
@@ -9315,7 +9315,7 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
y = (mi.rcWork.top+mi.rcWork.bottom-h)/2; // no need to call CenterWindow()
}
- UINT lastWindowType = s.lastWindowType;
+ UINT lastWindowType = s.nLastWindowType;
MoveWindow(x, y, w, h);
// Waffs : fullscreen command line
@@ -9338,10 +9338,10 @@ void CMainFrame::SetDefaultWindowRect(int iMonitor)
if (!m_fFullScreen && s.fLastFullScreen) ToggleFullscreen(true, true);
}
- if(s.fCaptionMenuMode!=MODE_SHOWCAPTIONMENU)
+ if(s.iCaptionMenuMode!=MODE_SHOWCAPTIONMENU)
{
DWORD dwRemove = WS_CAPTION;
- if(s.fCaptionMenuMode == MODE_BORDERLESS) dwRemove |= WS_THICKFRAME;
+ if(s.iCaptionMenuMode == MODE_BORDERLESS) dwRemove |= WS_THICKFRAME;
ModifyStyle(dwRemove, 0, SWP_NOZORDER);
::SetMenu(m_hWnd, NULL);
SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER);
@@ -9364,8 +9364,8 @@ void CMainFrame::RestoreDefaultWindowRect()
if(s.HasFixedWindowSize())
{
- w = s.fixedWindowSize.cx;
- h = s.fixedWindowSize.cy;
+ w = s.sizeFixedWindow.cx;
+ h = s.sizeFixedWindow.cy;
}
else
{
@@ -9464,7 +9464,7 @@ CSize CMainFrame::GetVideoSize()
if(GetPlaybackMode() == PM_DVD && SUCCEEDED(pDVDI->GetCurrentVideoAttributes(&VATR)))
arxy.SetSize(VATR.ulAspectX, VATR.ulAspectY);
- CSize& ar = AfxGetAppSettings().AspectRatio;
+ CSize& ar = AfxGetAppSettings().sizeAspectRatio;
if(ar.cx && ar.cy) arxy = ar;
ret = (!fKeepAspectRatio || arxy.cx <= 0 || arxy.cy <= 0)
@@ -9523,7 +9523,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
CString str;
CMonitor monitor;
- if(s.f_hmonitor == _T("Current"))
+ if(s.strFullScreenMonitor == _T("Current"))
{
hm = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
}
@@ -9533,7 +9533,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
{
monitor = monitors.GetMonitor( i );
monitor.GetName(str);
- if((monitor.IsMonitor()) && (s.f_hmonitor == str))
+ if((monitor.IsMonitor()) && (s.strFullScreenMonitor == str))
{
hm = monitor;
break;
@@ -9551,11 +9551,11 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
else
{
if(s.AutoChangeFullscrRes.bEnabled && s.AutoChangeFullscrRes.bApplyDefault)
- SetDispMode(s.AutoChangeFullscrRes.dmFullscreenResOther, s.f_hmonitor);
+ SetDispMode(s.AutoChangeFullscrRes.dmFullscreenResOther, s.strFullScreenMonitor);
- dwAdd = (s.fCaptionMenuMode==MODE_BORDERLESS ? 0 : s.fCaptionMenuMode==MODE_FRAMEONLY? WS_THICKFRAME: WS_CAPTION | WS_THICKFRAME);
+ dwAdd = (s.iCaptionMenuMode==MODE_BORDERLESS ? 0 : s.iCaptionMenuMode==MODE_FRAMEONLY? WS_THICKFRAME: WS_CAPTION | WS_THICKFRAME);
if (!m_fFirstFSAfterLaunchOnFS) r = m_lastWindowRect;
- hMenu = (s.fCaptionMenuMode==MODE_SHOWCAPTIONMENU) ? m_hMenuDefault: NULL;
+ hMenu = (s.iCaptionMenuMode==MODE_SHOWCAPTIONMENU) ? m_hMenuDefault: NULL;
if(AfxGetApp()->GetProfileInt(IDS_R_SETTINGS, _T("HidePlaylistFullScreen"), FALSE)) ShowControlBar(&m_wndPlaylistBar, m_PlayListBarVisible, TRUE);
}
@@ -9622,7 +9622,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
ShowControlBar(&m_wndNavigationBar, false, TRUE);
}
- if(s.m_fPreventMinimize)
+ if(s.fPreventMinimize)
{
if(hm != hm_cur) ModifyStyle(WS_MINIMIZEBOX, 0, SWP_NOZORDER);
}
@@ -9697,7 +9697,7 @@ void CMainFrame::ToggleFullscreen(bool fToNearest, bool fSwitchScreenResWhenHasT
void CMainFrame::AutoChangeMonitorMode()
{
AppSettings& s = AfxGetAppSettings();
- CStringW mf_hmonitor = s.f_hmonitor;
+ CStringW mf_hmonitor = s.strFullScreenMonitor;
double MediaFPS = 0.0;
if (GetPlaybackMode() == PM_FILE)
@@ -10245,7 +10245,7 @@ void CMainFrame::SetupIViAudReg()
// Open/Close
//
-bool CMainFrame::IsRealEngineCompatible(CString strFilename)
+bool CMainFrame::IsRealEngineCompatible(CString strFilename) const
{
// Real Media engine didn't support Unicode filename (nor filenames with # characters)
for(int i=0; i<strFilename.GetLength(); i++)
@@ -10284,7 +10284,7 @@ void CMainFrame::OpenCreateGraphObject(OpenMediaData* pOMD)
if(OpenFileData* p = dynamic_cast<OpenFileData*>(pOMD))
{
- engine_t engine = s.Formats.GetEngine(p->fns.GetHead());
+ engine_t engine = s.m_Formats.GetEngine(p->fns.GetHead());
CStringA ct = GetContentType(p->fns.GetHead());
@@ -11401,7 +11401,7 @@ bool DoesAudioPrecede(const CComPtr<IAMStreamSelect> &pSS, int a, int b)
int ia = -1;
int ib = -1;
- CStringW alo = AfxGetAppSettings().m_audiosLanguageOrder;
+ CStringW alo = AfxGetAppSettings().strAudiosLanguageOrder;
int tPos = 0;
CStringW lang = alo.Tokenize(_T(",; "), tPos);
while(tPos != -1 && ia == -1 && ib == -1)
@@ -11890,7 +11890,7 @@ int CMainFrame::SearchInDir(bool DirForward)
Play_sl.RemoveAll();
sl.RemoveAll();
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
CString dir = m_LastOpenFile.Mid(0,m_LastOpenFile.ReverseFind('\\')+1);
CString mask = dir + _T("*.*");
@@ -12764,13 +12764,13 @@ void CMainFrame::SetupNavChaptersSubMenu()
{
AppSettings& s = AfxGetAppSettings();
- POSITION pos = s.DVBChannels.GetHeadPosition();
+ POSITION pos = s.m_DVBChannels.GetHeadPosition();
while (pos)
{
- CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
+ CDVBChannel& Channel = s.m_DVBChannels.GetNext(pos);
UINT flags = MF_BYCOMMAND|MF_STRING|MF_ENABLED;
- if (Channel.GetPrefNumber() == s.DVBLastChannel)
+ if (Channel.GetPrefNumber() == s.nDVBLastChannel)
flags |= MF_CHECKED;
pSub->AppendMenu(flags, ID_NAVIGATE_CHAP_SUBITEM_START + Channel.GetPrefNumber(), Channel.GetName());
}
@@ -13177,7 +13177,7 @@ bool DoesSubPrecede(const CComPtr<ISubStream> &a, const CComPtr<ISubStream> &b)
int ia = -1;
int ib = -1;
- CStringW slo = AfxGetAppSettings().m_subtitlesLanguageOrder;
+ CStringW slo = AfxGetAppSettings().strSubtitlesLanguageOrder;
int tPos = 0;
CStringW lang = slo.Tokenize(_T(",; "), tPos);
while(tPos != -1 && ia == -1 && ib == -1)
@@ -13985,7 +13985,7 @@ bool CMainFrame::StopCapture()
hr = pME->RestoreDefaultHandling(EC_REPAINT);
- ::SetPriorityClass(::GetCurrentProcess(), AfxGetAppSettings().priority);
+ ::SetPriorityClass(::GetCurrentProcess(), AfxGetAppSettings().dwPriority);
m_rtDurationOverride = -1;
@@ -14104,7 +14104,7 @@ void CMainFrame::OpenMedia(CAutoPtr<OpenMediaData> pOMD)
{
if(p->fns.GetCount() > 0)
{
- engine_t e = s.Formats.GetEngine(p->fns.GetHead());
+ engine_t e = s.m_Formats.GetEngine(p->fns.GetHead());
if (e != DirectShow /*&& e != RealMedia && e != QuickTime*/)
fUseThread = false;
}
@@ -14205,7 +14205,7 @@ void CMainFrame::StopTunerScan()
void CMainFrame::DisplayCurrentChannelOSD()
{
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
CString osd;
int i = osd.Find(_T("\n"));
PresentFollowing NowNext;
@@ -14226,7 +14226,7 @@ void CMainFrame::DisplayCurrentChannelOSD()
void CMainFrame::DisplayCurrentChannelInfo()
{
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
CString osd;
PresentFollowing NowNext;
@@ -14359,7 +14359,7 @@ bool CMainFrame::CreateFullScreenWindow()
if(!s.iMonitor)
{
- if(s.f_hmonitor == _T("Current"))
+ if(s.strFullScreenMonitor == _T("Current"))
{
hMonitor = MonitorFromWindow(m_hWnd, MONITOR_DEFAULTTONEAREST);
}
@@ -14370,7 +14370,7 @@ bool CMainFrame::CreateFullScreenWindow()
monitor = monitors.GetMonitor( i );
monitor.GetName(str);
- if((monitor.IsMonitor()) && (s.f_hmonitor == str))
+ if((monitor.IsMonitor()) && (s.strFullScreenMonitor == str))
{
hMonitor = monitor;
break;
@@ -14409,7 +14409,7 @@ bool CMainFrame::CreateFullScreenWindow()
}
-bool CMainFrame::IsD3DFullScreenMode()
+bool CMainFrame::IsD3DFullScreenMode() const
{
return m_pFullscreenWnd->IsWindow();
};
@@ -14433,7 +14433,7 @@ void CMainFrame::SetVMR9ColorControl(float dBrightness, float dContrast, float d
}
}
-LPCTSTR CMainFrame::GetDVDAudioFormatName (DVD_AudioAttributes& ATR)
+LPCTSTR CMainFrame::GetDVDAudioFormatName (DVD_AudioAttributes& ATR) const
{
switch(ATR.AudioFormat)
{
@@ -15072,9 +15072,9 @@ void CMainFrame::OnFileOpendirectory()
CString filter;
CAtlArray<CString> mask;
- s.Formats.GetFilter(filter, mask);
+ s.m_Formats.GetFilter(filter, mask);
- COpenDirHelper::f_lastOpenDir = s.f_lastOpenDir;
+ COpenDirHelper::strLastOpenDir = s.strLastOpenDir;
TCHAR path[_MAX_PATH];
COpenDirHelper::m_incl_subdir = TRUE;
@@ -15098,7 +15098,7 @@ void CMainFrame::OnFileOpendirectory()
CString _path = path;
_path.Replace('/', '\\');
if(_path[_path.GetLength()-1] != '\\') _path += '\\';
- s.f_lastOpenDir = _path;
+ s.strLastOpenDir = _path;
CAtlList<CString> sl;
sl.AddTail(_path);
@@ -15120,7 +15120,7 @@ void CMainFrame::OnFileOpendirectory()
HRESULT CMainFrame::CreateThumbnailToolbar()
{
- if(!AfxGetAppSettings().m_fUseWin7TaskBar) return E_FAIL;
+ if(!AfxGetAppSettings().fUseWin7TaskBar) return E_FAIL;
DWORD dwMajor = LOBYTE(LOWORD(GetVersion()));
DWORD dwMinor = HIBYTE(LOWORD(GetVersion()));
@@ -15232,7 +15232,7 @@ HRESULT CMainFrame::UpdateThumbarButton()
if ( !m_pTaskbarList )
return E_FAIL;
- if ( !AfxGetAppSettings().m_fUseWin7TaskBar )
+ if ( !AfxGetAppSettings().fUseWin7TaskBar )
{
m_pTaskbarList->SetOverlayIcon( m_hWnd, NULL, L"" );
m_pTaskbarList->SetProgressState( m_hWnd, TBPF_NOPROGRESS );
@@ -15360,7 +15360,7 @@ HRESULT CMainFrame::UpdateThumbnailClip()
if ( !m_pTaskbarList )
return E_FAIL;
- if ( (!AfxGetAppSettings().m_fUseWin7TaskBar) || (m_iMediaLoadState != MLS_LOADED) || (m_fAudioOnly) || m_fFullScreen )
+ if ( (!AfxGetAppSettings().fUseWin7TaskBar) || (m_iMediaLoadState != MLS_LOADED) || (m_fAudioOnly) || m_fFullScreen )
{
return m_pTaskbarList->SetThumbnailClip( m_hWnd, NULL );
}
diff --git a/src/apps/mplayerc/MainFrm.h b/src/apps/mplayerc/MainFrm.h
index 2089fd4fe..e5131b0f9 100644
--- a/src/apps/mplayerc/MainFrm.h
+++ b/src/apps/mplayerc/MainFrm.h
@@ -342,7 +342,7 @@ public:
void StopWebServer();
CString GetStatusMessage();
- int GetPlaybackMode()
+ int GetPlaybackMode() const
{
return m_iPlaybackMode;
}
@@ -371,15 +371,15 @@ public:
CComPtr<IBaseFilter> m_pRefClock; // Adjustable reference clock. GothSync
CComPtr<ISyncClock> m_pSyncClock;
- bool IsFrameLessWindow()
+ bool IsFrameLessWindow() const
{
- return(m_fFullScreen || AfxGetAppSettings().fCaptionMenuMode==MODE_BORDERLESS);
+ return(m_fFullScreen || AfxGetAppSettings().iCaptionMenuMode==MODE_BORDERLESS);
}
- bool IsCaptionMenuHidden()
+ bool IsCaptionMenuHidden() const
{
- return(!m_fFullScreen && AfxGetAppSettings().fCaptionMenuMode!=MODE_SHOWCAPTIONMENU);
+ return(!m_fFullScreen && AfxGetAppSettings().iCaptionMenuMode!=MODE_SHOWCAPTIONMENU);
}
- bool IsSomethingLoaded()
+ bool IsSomethingLoaded() const
{
return((m_iMediaLoadState == MLS_LOADING || m_iMediaLoadState == MLS_LOADED) && !IsD3DFullScreenMode());
}
@@ -387,11 +387,11 @@ public:
{
return(m_wndPlaylistBar.GetCount() == 0);
}
- bool IsInteractiveVideo()
+ bool IsInteractiveVideo() const
{
return(AfxGetAppSettings().fIntRealMedia && m_fRealMediaGraph || m_fShockwaveGraph);
}
- bool IsD3DFullScreenMode();
+ bool IsD3DFullScreenMode() const;
CControlBar* m_pLastBar;
@@ -912,11 +912,11 @@ public:
void SetPlayState(MPC_PLAYSTATE iState);
bool CreateFullScreenWindow();
void SetVMR9ColorControl(float dBrightness, float dContrast, float dHue, float dSaturation);
- LPCTSTR GetDVDAudioFormatName (DVD_AudioAttributes& ATR);
+ LPCTSTR GetDVDAudioFormatName (DVD_AudioAttributes& ATR) const;
void SetAudioDelay(REFERENCE_TIME rtShift);
void SetSubtitleDelay(int delay_ms);
// void AutoSelectTracks();
- bool IsRealEngineCompatible(CString strFilename);
+ bool IsRealEngineCompatible(CString strFilename) const;
void SetTimersPlay();
void KillTimersStop();
diff --git a/src/apps/mplayerc/OpenDirHelper.cpp b/src/apps/mplayerc/OpenDirHelper.cpp
index 58cd5a49f..6b2cc6514 100644
--- a/src/apps/mplayerc/OpenDirHelper.cpp
+++ b/src/apps/mplayerc/OpenDirHelper.cpp
@@ -27,7 +27,7 @@
WNDPROC COpenDirHelper::CBProc;
bool COpenDirHelper::m_incl_subdir;
-CString COpenDirHelper::f_lastOpenDir;
+CString COpenDirHelper::strLastOpenDir;
void COpenDirHelper::SetFont(HWND hwnd,LPTSTR FontName,int FontSize)
{
@@ -74,7 +74,7 @@ int __stdcall COpenDirHelper::BrowseCallbackProcDIR(HWND hwnd,UINT uMsg,LPARAM
//Initialization callback message
if(uMsg==BFFM_INITIALIZED)
{
- SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)(LPCTSTR)f_lastOpenDir);
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)(LPCTSTR)strLastOpenDir);
RECT ListViewRect;
RECT Dialog;
diff --git a/src/apps/mplayerc/OpenDirHelper.h b/src/apps/mplayerc/OpenDirHelper.h
index fff8fe730..9118c3463 100644
--- a/src/apps/mplayerc/OpenDirHelper.h
+++ b/src/apps/mplayerc/OpenDirHelper.h
@@ -27,7 +27,7 @@ class COpenDirHelper {
public:
static WNDPROC CBProc;
static bool m_incl_subdir;
- static CString f_lastOpenDir;
+ static CString strLastOpenDir;
static void SetFont(HWND hwnd,LPTSTR FontName,int FontSize);
// Subclass procedure
diff --git a/src/apps/mplayerc/OpenDlg.cpp b/src/apps/mplayerc/OpenDlg.cpp
index aeabb4826..c66075137 100644
--- a/src/apps/mplayerc/OpenDlg.cpp
+++ b/src/apps/mplayerc/OpenDlg.cpp
@@ -121,7 +121,7 @@ void COpenDlg::OnBnClickedBrowsebutton()
CString filter;
CAtlArray<CString> mask;
- AfxGetAppSettings().Formats.GetFilter(filter, mask);
+ AfxGetAppSettings().m_Formats.GetFilter(filter, mask);
COpenFileDlg fd(mask, true, NULL, m_path,
OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ALLOWMULTISELECT|OFN_ENABLEINCLUDENOTIFY,
@@ -163,7 +163,7 @@ void COpenDlg::OnBnClickedBrowsebutton2()
CString filter;
CAtlArray<CString> mask;
- AfxGetAppSettings().Formats.GetAudioFilter(filter, mask);
+ AfxGetAppSettings().m_Formats.GetAudioFilter(filter, mask);
COpenFileDlg fd(mask, false, NULL, m_path2,
OFN_EXPLORER|OFN_ENABLESIZING|OFN_HIDEREADONLY|OFN_ENABLEINCLUDENOTIFY,
@@ -191,5 +191,5 @@ void COpenDlg::OnBnClickedOk()
void COpenDlg::OnUpdateDub(CCmdUI* pCmdUI)
{
m_mrucombo.GetWindowText(m_path);
- pCmdUI->Enable(AfxGetAppSettings().Formats.GetEngine(m_path) == DirectShow);
+ pCmdUI->Enable(AfxGetAppSettings().m_Formats.GetEngine(m_path) == DirectShow);
}
diff --git a/src/apps/mplayerc/PPageAccelTbl.cpp b/src/apps/mplayerc/PPageAccelTbl.cpp
index c4f865ac1..0c46c930c 100644
--- a/src/apps/mplayerc/PPageAccelTbl.cpp
+++ b/src/apps/mplayerc/PPageAccelTbl.cpp
@@ -1459,9 +1459,9 @@ BOOL CPPageAccelTbl::OnInitDialog()
m_wmcmds.RemoveAll();
m_wmcmds.AddTail(&s.wmcmds);
m_fWinLirc = s.fWinLirc;
- m_WinLircAddr = s.WinLircAddr;
+ m_WinLircAddr = s.strWinLircAddr;
m_fUIce = s.fUIce;
- m_UIceAddr = s.UIceAddr;
+ m_UIceAddr = s.strUIceAddr;
m_fGlobalMedia = s.fGlobalMedia;
UpdateData(FALSE);
@@ -1475,7 +1475,7 @@ BOOL CPPageAccelTbl::OnInitDialog()
WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_TABSTOP|LVS_REPORT|LVS_AUTOARRANGE|LVS_SHOWSELALWAYS,
r, this, IDC_LIST1);
- m_list.SetExtendedStyle(m_list.GetExtendedStyle()|LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER);
+ m_list.SetExtendedStyle(m_list.GetExtendedStyle()|LVS_EX_FULLROWSELECT|LVS_EX_DOUBLEBUFFER|LVS_EX_GRIDLINES);
for(int i = 0, j = m_list.GetHeaderCtrl()->GetItemCount(); i < j; i++) m_list.DeleteColumn(0);
m_list.InsertColumn(COL_CMD, ResStr(IDS_AG_COMMAND), LVCFMT_LEFT, 80);
@@ -1531,10 +1531,10 @@ BOOL CPPageAccelTbl::OnApply()
GetParentFrame()->m_hAccelTable = s.hAccel;
s.fWinLirc = !!m_fWinLirc;
- s.WinLircAddr = m_WinLircAddr;
+ s.strWinLircAddr = m_WinLircAddr;
if(s.fWinLirc) s.WinLircClient.Connect(m_WinLircAddr);
s.fUIce = !!m_fUIce;
- s.UIceAddr = m_UIceAddr;
+ s.strUIceAddr = m_UIceAddr;
if(s.fUIce) s.UIceClient.Connect(m_UIceAddr);
s.fGlobalMedia = !!m_fGlobalMedia;
diff --git a/src/apps/mplayerc/PPageAudioSwitcher.cpp b/src/apps/mplayerc/PPageAudioSwitcher.cpp
index af38caddf..9b46a82f6 100644
--- a/src/apps/mplayerc/PPageAudioSwitcher.cpp
+++ b/src/apps/mplayerc/PPageAudioSwitcher.cpp
@@ -106,11 +106,11 @@ BOOL CPPageAudioSwitcher::OnInitDialog()
m_fEnableAudioSwitcher = s.fEnableAudioSwitcher;
m_fAudioNormalize = s.fAudioNormalize;
m_fAudioNormalizeRecover = s.fAudioNormalizeRecover;
- m_AudioBoost = (int)(50.0f*log10(s.AudioBoost));
+ m_AudioBoost = (int)(50.0f*log10(s.dAudioBoost));
m_AudioBoostCtrl.SetRange(0, 100);
m_fDownSampleTo441 = s.fDownSampleTo441;
m_fAudioTimeShift = s.fAudioTimeShift;
- m_tAudioTimeShift = s.tAudioTimeShift;
+ m_tAudioTimeShift = s.iAudioTimeShift;
m_tAudioTimeShiftSpin.SetRange32(-1000*60*60*24, 1000*60*60*24);
m_fCustomChannelMapping = s.fCustomChannelMapping;
memcpy(m_pSpeakerToChannelMap, s.pSpeakerToChannelMap, sizeof(s.pSpeakerToChannelMap));
@@ -118,7 +118,7 @@ BOOL CPPageAudioSwitcher::OnInitDialog()
if(m_pASF)
m_pASF->GetInputSpeakerConfig(&m_dwChannelMask);
- m_nChannels = s.fnChannels;
+ m_nChannels = s.nSpeakerChannels;
m_nChannelsSpinCtrl.SetRange(1, 18);
if(m_pASF)
@@ -171,10 +171,10 @@ BOOL CPPageAudioSwitcher::OnApply()
s.fEnableAudioSwitcher = !!m_fEnableAudioSwitcher;
s.fAudioNormalize = !!m_fAudioNormalize;
s.fAudioNormalizeRecover = !!m_fAudioNormalizeRecover;
- s.AudioBoost = pow(10.0f, (float)m_AudioBoost/50);
+ s.dAudioBoost = pow(10.0f, (float)m_AudioBoost/50);
s.fDownSampleTo441 = !!m_fDownSampleTo441;
s.fAudioTimeShift = !!m_fAudioTimeShift;
- s.tAudioTimeShift = m_tAudioTimeShift;
+ s.iAudioTimeShift = m_tAudioTimeShift;
s.fCustomChannelMapping = !!m_fCustomChannelMapping;
memcpy(s.pSpeakerToChannelMap, m_pSpeakerToChannelMap, sizeof(m_pSpeakerToChannelMap));
@@ -182,11 +182,11 @@ BOOL CPPageAudioSwitcher::OnApply()
{
m_pASF->SetSpeakerConfig(s.fCustomChannelMapping, s.pSpeakerToChannelMap);
m_pASF->EnableDownSamplingTo441(s.fDownSampleTo441);
- m_pASF->SetAudioTimeShift(s.fAudioTimeShift ? 10000i64*s.tAudioTimeShift : 0);
- m_pASF->SetNormalizeBoost(s.fAudioNormalize, s.fAudioNormalizeRecover, s.AudioBoost);
+ m_pASF->SetAudioTimeShift(s.fAudioTimeShift ? 10000i64*s.iAudioTimeShift : 0);
+ m_pASF->SetNormalizeBoost(s.fAudioNormalize, s.fAudioNormalizeRecover, s.dAudioBoost);
}
- s.fnChannels = m_nChannels;
+ s.nSpeakerChannels = m_nChannels;
return __super::OnApply();
}
diff --git a/src/apps/mplayerc/PPageBase.cpp b/src/apps/mplayerc/PPageBase.cpp
index 28b1d6137..f3c23a6a9 100644
--- a/src/apps/mplayerc/PPageBase.cpp
+++ b/src/apps/mplayerc/PPageBase.cpp
@@ -89,7 +89,7 @@ END_MESSAGE_MAP()
BOOL CPPageBase::OnSetActive()
{
- AfxGetAppSettings().iLastUsedPage = (UINT)m_pPSP->pszTemplate;
+ AfxGetAppSettings().nLastUsedPage = (UINT)m_pPSP->pszTemplate;
return __super::OnSetActive();
}
diff --git a/src/apps/mplayerc/PPageCapture.cpp b/src/apps/mplayerc/PPageCapture.cpp
index 8dcaacfee..b7abda347 100644
--- a/src/apps/mplayerc/PPageCapture.cpp
+++ b/src/apps/mplayerc/PPageCapture.cpp
@@ -464,7 +464,7 @@ void CPPageCapture::FindDigitalDevices()
if(SUCCEEDED(pMoniker->GetDisplayName(NULL, NULL, &strName)))
{
m_providernames.Add(CString(strName));
- if (s.BDANetworkProvider == CString(strName)) iSel = i;
+ if (s.strBDANetworkProvider == CString(strName)) iSel = i;
CoTaskMemFree(strName);
}
}
@@ -487,7 +487,7 @@ void CPPageCapture::FindDigitalDevices()
if(SUCCEEDED(pMoniker->GetDisplayName(NULL, NULL, &strName)))
{
m_tunernames.Add(CString(strName));
- if (s.BDATuner == CString(strName)) iSel = i;
+ if (s.strBDATuner == CString(strName)) iSel = i;
CoTaskMemFree(strName);
}
}
@@ -509,7 +509,7 @@ void CPPageCapture::FindDigitalDevices()
if(SUCCEEDED(pMoniker->GetDisplayName(NULL, NULL, &strName)))
{
m_receivernames.Add(CString(strName));
- if (s.BDAReceiver == CString(strName)) iSel = i;
+ if (s.strBDAReceiver == CString(strName)) iSel = i;
CoTaskMemFree(strName);
}
}
@@ -534,11 +534,11 @@ BOOL CPPageCapture::OnApply()
s.iAnalogCountry = ((cc_t*)m_cbAnalogCountry.GetItemDataPtr(m_cbAnalogCountry.GetCurSel()))->code;
if (m_cbDigitalNetworkProvider.GetCurSel()>=0)
- s.BDANetworkProvider = m_providernames[m_cbDigitalNetworkProvider.GetCurSel()];
+ s.strBDANetworkProvider = m_providernames[m_cbDigitalNetworkProvider.GetCurSel()];
if (m_cbDigitalTuner.GetCurSel()>=0)
- s.BDATuner = m_tunernames[m_cbDigitalTuner.GetCurSel()];
+ s.strBDATuner = m_tunernames[m_cbDigitalTuner.GetCurSel()];
if (m_cbDigitalReceiver.GetCurSel()>=0)
- s.BDAReceiver = m_receivernames[m_cbDigitalReceiver.GetCurSel()];
+ s.strBDAReceiver = m_receivernames[m_cbDigitalReceiver.GetCurSel()];
return __super::OnApply();
}
diff --git a/src/apps/mplayerc/PPageDVD.cpp b/src/apps/mplayerc/PPageDVD.cpp
index d4393d471..823163d45 100644
--- a/src/apps/mplayerc/PPageDVD.cpp
+++ b/src/apps/mplayerc/PPageDVD.cpp
@@ -241,7 +241,7 @@ BOOL CPPageDVD::OnInitDialog()
AppSettings& s = AfxGetAppSettings();
m_iDVDLocation = s.fUseDVDPath ? 1 : 0;
- m_dvdpath = s.sDVDPath;
+ m_dvdpath = s.strDVDPath;
m_iDVDLangType = 0;
m_idMenuLang = s.idMenuLang;
@@ -269,7 +269,7 @@ BOOL CPPageDVD::OnApply()
AppSettings& s = AfxGetAppSettings();
- s.sDVDPath = m_dvdpath;
+ s.strDVDPath = m_dvdpath;
s.fUseDVDPath = (m_iDVDLocation == 1);
s.idMenuLang = m_idMenuLang;
s.idAudioLang = m_idAudioLang;
diff --git a/src/apps/mplayerc/PPageExternalFilters.cpp b/src/apps/mplayerc/PPageExternalFilters.cpp
index 5321f5df5..b088096cc 100644
--- a/src/apps/mplayerc/PPageExternalFilters.cpp
+++ b/src/apps/mplayerc/PPageExternalFilters.cpp
@@ -286,10 +286,10 @@ BOOL CPPageExternalFilters::OnInitDialog()
m_pFilters.RemoveAll();
- POSITION pos = s.filters.GetHeadPosition();
+ POSITION pos = s.m_filters.GetHeadPosition();
while(pos)
{
- CAutoPtr<FilterOverride> f(DNew FilterOverride(s.filters.GetNext(pos)));
+ CAutoPtr<FilterOverride> f(DNew FilterOverride(s.m_filters.GetNext(pos)));
CString name(_T("<unknown>"));
@@ -322,7 +322,7 @@ BOOL CPPageExternalFilters::OnApply()
AppSettings& s = AfxGetAppSettings();
- s.filters.RemoveAll();
+ s.m_filters.RemoveAll();
for(int i = 0; i < m_filters.GetCount(); i++)
{
@@ -330,7 +330,7 @@ BOOL CPPageExternalFilters::OnApply()
{
CAutoPtr<FilterOverride> f(DNew FilterOverride(m_pFilters.GetAt(pos)));
f->fDisabled = !m_filters.GetCheck(i);
- s.filters.AddTail(f);
+ s.m_filters.AddTail(f);
}
}
diff --git a/src/apps/mplayerc/PPageFormats.cpp b/src/apps/mplayerc/PPageFormats.cpp
index 06b8094be..bf8afc85d 100644
--- a/src/apps/mplayerc/PPageFormats.cpp
+++ b/src/apps/mplayerc/PPageFormats.cpp
@@ -430,7 +430,7 @@ void CPPageFormats::SetListItemState(int nItem)
{
if(nItem < 0) return;
- CString str = AfxGetAppSettings().Formats[(int)m_list.GetItemData(nItem)].GetExtsWithPeriod();
+ CString str = AfxGetAppSettings().m_Formats[(int)m_list.GetItemData(nItem)].GetExtsWithPeriod();
CAtlList<CString> exts;
ExplodeMin(str, exts, ' ');
@@ -475,7 +475,7 @@ BOOL CPPageFormats::OnInitDialog()
m_onoff.Create(IDB_ONOFF, 12, 3, 0xffffff);
m_list.SetImageList(&m_onoff, LVSIL_SMALL);
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
mf.UpdateData(FALSE);
for(int i = 0; i < (int)mf.GetCount(); i++)
{
@@ -501,7 +501,7 @@ BOOL CPPageFormats::OnInitDialog()
AppSettings& s = AfxGetAppSettings();
bool fRtspFileExtFirst;
- engine_t e = s.Formats.GetRtspHandler(fRtspFileExtFirst);
+ engine_t e = s.m_Formats.GetRtspHandler(fRtspFileExtFirst);
m_iRtspHandler = (e==RealMedia?0:e==QuickTime?1:2);
m_fRtspFileExtFirst = fRtspFileExtFirst;
@@ -704,14 +704,14 @@ BOOL CPPageFormats::OnApply()
if(i >= 0) i = (int)m_list.GetItemData(i);
if(i >= 0)
{
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
mf[i].SetExts(m_exts);
m_exts = mf[i].GetExtsWithPeriod();
UpdateData(FALSE);
}
}
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
CString AppIcon = _T("");
TCHAR buff[_MAX_PATH];
@@ -798,7 +798,7 @@ BOOL CPPageFormats::OnApply()
AddAutoPlayToRegistry(AP_DVDMOVIE, !!m_apdvd.GetCheck());
AppSettings& s = AfxGetAppSettings();
- s.Formats.SetRtspHandler(m_iRtspHandler==0?RealMedia:m_iRtspHandler==1?QuickTime:DirectShow, !!m_fRtspFileExtFirst);
+ s.m_Formats.SetRtspHandler(m_iRtspHandler==0?RealMedia:m_iRtspHandler==1?QuickTime:DirectShow, !!m_fRtspFileExtFirst);
s.fAssociatedWithIcons = !!m_fAssociatedWithIcons.GetCheck();
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
@@ -836,7 +836,7 @@ void CPPageFormats::OnLvnItemchangedList1(NMHDR *pNMHDR, LRESULT *pResult)
if(pNMLV->iItem >= 0 && pNMLV->iSubItem == COL_CATEGORY
&& (pNMLV->uChanged&LVIF_STATE) && (pNMLV->uNewState&LVIS_SELECTED))
{
- m_exts = AfxGetAppSettings().Formats[(int)m_list.GetItemData(pNMLV->iItem)].GetExtsWithPeriod();
+ m_exts = AfxGetAppSettings().m_Formats[(int)m_list.GetItemData(pNMLV->iItem)].GetExtsWithPeriod();
UpdateData(FALSE);
}
@@ -869,7 +869,7 @@ void CPPageFormats::OnDolabeleditList(NMHDR* pNMHDR, LRESULT* pResult)
if(pItem->iItem < 0)
return;
- CMediaFormatCategory& mfc = AfxGetAppSettings().Formats[m_list.GetItemData(pItem->iItem)];
+ CMediaFormatCategory& mfc = AfxGetAppSettings().m_Formats[m_list.GetItemData(pItem->iItem)];
CAtlList<CString> sl;
int nSel = -1;
@@ -902,7 +902,7 @@ void CPPageFormats::OnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult)
if(pItem->iItem < 0)
return;
- CMediaFormatCategory& mfc = AfxGetAppSettings().Formats[m_list.GetItemData(pItem->iItem)];
+ CMediaFormatCategory& mfc = AfxGetAppSettings().m_Formats[m_list.GetItemData(pItem->iItem)];
if(pItem->iSubItem == COL_ENGINE && pItem->lParam >= 0)
{
@@ -932,7 +932,7 @@ void CPPageFormats::OnBnClickedButton1()
void CPPageFormats::OnBnClickedButton14()
{
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
for(int i = 0, j = m_list.GetItemCount(); i < j; i++)
{
@@ -954,7 +954,7 @@ void CPPageFormats::OnBnClickedButton14()
void CPPageFormats::OnBnClickedButton13()
{
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
for(int i = 0, j = m_list.GetItemCount(); i < j; i++)
{
@@ -988,7 +988,7 @@ void CPPageFormats::OnBnClickedButton12()
int i = m_list.GetSelectionMark();
if(i < 0) return;
i = (int)m_list.GetItemData(i);
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
mf[i].RestoreDefaultExts();
m_exts = mf[i].GetExtsWithPeriod();
SetListItemState(m_list.GetSelectionMark());
@@ -1003,7 +1003,7 @@ void CPPageFormats::OnBnClickedButton11()
int i = m_list.GetSelectionMark();
if(i < 0) return;
i = (int)m_list.GetItemData(i);
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
mf[i].SetExts(m_exts);
m_exts = mf[i].GetExtsWithPeriod();
SetListItemState(m_list.GetSelectionMark());
@@ -1025,7 +1025,7 @@ void CPPageFormats::OnUpdateButtonDefault(CCmdUI* pCmdUI)
CString orgexts, newexts;
GetDlgItem(IDC_EDIT1)->GetWindowText(newexts);
newexts.Trim();
- orgexts = AfxGetAppSettings().Formats[i].GetBackupExtsWithPeriod();
+ orgexts = AfxGetAppSettings().m_Formats[i].GetBackupExtsWithPeriod();
pCmdUI->Enable(!!newexts.CompareNoCase(orgexts));
}
@@ -1043,7 +1043,7 @@ void CPPageFormats::OnUpdateButtonSet(CCmdUI* pCmdUI)
CString orgexts, newexts;
GetDlgItem(IDC_EDIT1)->GetWindowText(newexts);
newexts.Trim();
- orgexts = AfxGetAppSettings().Formats[i].GetExtsWithPeriod();
+ orgexts = AfxGetAppSettings().m_Formats[i].GetExtsWithPeriod();
pCmdUI->Enable(!!newexts.CompareNoCase(orgexts));
}
diff --git a/src/apps/mplayerc/PPageFullscreen.cpp b/src/apps/mplayerc/PPageFullscreen.cpp
index dcd759229..b74adf5b8 100644
--- a/src/apps/mplayerc/PPageFullscreen.cpp
+++ b/src/apps/mplayerc/PPageFullscreen.cpp
@@ -93,10 +93,10 @@ BOOL CPPageFullscreen::OnInitDialog()
AppSettings& s = AfxGetAppSettings();
- m_launchfullscreen = s.launchfullscreen;
+ m_launchfullscreen = s.fLaunchfullscreen;
m_AutoChangeFullscrRes = s.AutoChangeFullscrRes;
m_fSetDefault = s.AutoChangeFullscrRes.bApplyDefault;
- m_f_hmonitor = s.f_hmonitor;
+ m_f_hmonitor = s.strFullScreenMonitor;
m_iShowBarsWhenFullScreen = s.fShowBarsWhenFullScreen;
m_nShowBarsWhenFullScreenTimeOut = s.nShowBarsWhenFullScreenTimeOut;
m_nTimeOutCtrl.SetRange(-1, 10);
@@ -184,8 +184,8 @@ BOOL CPPageFullscreen::OnApply()
}
m_AutoChangeFullscrRes.bApplyDefault = m_fSetDefault;
s.AutoChangeFullscrRes = m_AutoChangeFullscrRes;
- s.launchfullscreen = !!m_launchfullscreen;
- s.f_hmonitor = m_f_hmonitor;
+ s.fLaunchfullscreen = !!m_launchfullscreen;
+ s.strFullScreenMonitor = m_f_hmonitor;
s.fShowBarsWhenFullScreen = !!m_iShowBarsWhenFullScreen;
s.nShowBarsWhenFullScreenTimeOut = m_nShowBarsWhenFullScreenTimeOut;
s.fExitFullScreenAtTheEnd = !!m_fExitFullScreenAtTheEnd;
@@ -239,7 +239,7 @@ void CPPageFullscreen::OnUpdateFullScrCombo()
{
CMonitors monitors;
m_f_hmonitor = m_MonitorDisplayNames[m_iMonitorTypeCtrl.GetCurSel()];
- if(AfxGetAppSettings().f_hmonitor != m_f_hmonitor) m_AutoChangeFullscrRes.bEnabled = false;
+ if(AfxGetAppSettings().strFullScreenMonitor != m_f_hmonitor) m_AutoChangeFullscrRes.bEnabled = false;
ModesUpdate();
SetModified();
}
diff --git a/src/apps/mplayerc/PPageLogo.cpp b/src/apps/mplayerc/PPageLogo.cpp
index 6eaf8d804..e8f03102c 100644
--- a/src/apps/mplayerc/PPageLogo.cpp
+++ b/src/apps/mplayerc/PPageLogo.cpp
@@ -72,15 +72,15 @@ BOOL CPPageLogo::OnInitDialog()
AppSettings& s = AfxGetAppSettings();
- m_intext = s.logoext?1:0;
- m_logofn = s.logofn;
+ m_intext = s.fLogoExternal?1:0;
+ m_logofn = s.strLogoFileName;
UpdateData(FALSE);
m_logoidpos = m_logoids.GetHeadPosition();
for(POSITION pos = m_logoids.GetHeadPosition(); pos; m_logoids.GetNext(pos))
{
- if(m_logoids.GetAt(pos) == s.logoid)
+ if(m_logoids.GetAt(pos) == s.nLogoId)
{
m_logoidpos = pos;
break;
@@ -100,9 +100,9 @@ BOOL CPPageLogo::OnApply()
AppSettings& s = AfxGetAppSettings();
- s.logoext = !!m_intext;
- s.logofn = m_logofn;
- s.logoid = m_logoids.GetAt(m_logoidpos);
+ s.fLogoExternal = !!m_intext;
+ s.strLogoFileName = m_logofn;
+ s.nLogoId = m_logoids.GetAt(m_logoidpos);
((CMainFrame*)AfxGetMainWnd())->m_wndView.LoadLogo();
diff --git a/src/apps/mplayerc/PPageOutput.cpp b/src/apps/mplayerc/PPageOutput.cpp
index d3b6cb1a3..b5548c0ef 100644
--- a/src/apps/mplayerc/PPageOutput.cpp
+++ b/src/apps/mplayerc/PPageOutput.cpp
@@ -168,7 +168,7 @@ BOOL CPPageOutput::OnInitDialog()
}
m_iAudioRendererTypeCtrl.AddString(Cbstr);
- if(s.AudioRendererDisplayName == str && m_iAudioRendererType == 0)
+ if(s.strAudioRendererDisplayName == str && m_iAudioRendererType == 0)
{
m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount()-1;
}
@@ -179,19 +179,19 @@ BOOL CPPageOutput::OnInitDialog()
Cbstr.Format(_T("%d: %s"), i++, AUDRNDT_NULL_COMP);
m_AudioRendererDisplayNames.Add(AUDRNDT_NULL_COMP);
m_iAudioRendererTypeCtrl.AddString(Cbstr);
- if(s.AudioRendererDisplayName == AUDRNDT_NULL_COMP && m_iAudioRendererType == 0)
+ if(s.strAudioRendererDisplayName == AUDRNDT_NULL_COMP && m_iAudioRendererType == 0)
m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount()-1;
Cbstr.Format(_T("%d: %s"), i++, AUDRNDT_NULL_UNCOMP);
m_AudioRendererDisplayNames.Add(AUDRNDT_NULL_UNCOMP);
m_iAudioRendererTypeCtrl.AddString(Cbstr);
- if(s.AudioRendererDisplayName == AUDRNDT_NULL_UNCOMP && m_iAudioRendererType == 0)
+ if(s.strAudioRendererDisplayName == AUDRNDT_NULL_UNCOMP && m_iAudioRendererType == 0)
m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount()-1;
Cbstr.Format(_T("%d: %s"), i++, AUDRNDT_MPC);
m_AudioRendererDisplayNames.Add(AUDRNDT_MPC);
m_iAudioRendererTypeCtrl.AddString(Cbstr);
- if(s.AudioRendererDisplayName == AUDRNDT_MPC && m_iAudioRendererType == 0)
+ if(s.strAudioRendererDisplayName == AUDRNDT_MPC && m_iAudioRendererType == 0)
m_iAudioRendererType = m_iAudioRendererTypeCtrl.GetCount()-1;
@@ -329,7 +329,7 @@ BOOL CPPageOutput::OnApply()
renderersSettings.fVMR9MixerMode = !!m_fVMR9MixerMode;
renderersSettings.fVMR9MixerYUV = !!m_fVMR9MixerYUV;
renderersSettings.m_RenderSettings.fVMR9AlterativeVSync = m_fVMR9AlterativeVSync != 0;
- s.AudioRendererDisplayName = m_AudioRendererDisplayNames[m_iAudioRendererType];
+ s.strAudioRendererDisplayName = m_AudioRendererDisplayNames[m_iAudioRendererType];
s.fD3DFullscreen = m_fD3DFullscreen ? true : false;
renderersSettings.fResetDevice = !!m_fResetDevice;
diff --git a/src/apps/mplayerc/PPagePlayback.cpp b/src/apps/mplayerc/PPagePlayback.cpp
index ca1f25c9d..485a5e6eb 100644
--- a/src/apps/mplayerc/PPagePlayback.cpp
+++ b/src/apps/mplayerc/PPagePlayback.cpp
@@ -110,8 +110,8 @@ BOOL CPPagePlayback::OnInitDialog()
m_fAutoloadSubtitles = s.fAutoloadSubtitles;
m_fEnableWorkerThreadForOpening = s.fEnableWorkerThreadForOpening;
m_fReportFailedPins = s.fReportFailedPins;
- m_subtitlesLanguageOrder = s.m_subtitlesLanguageOrder;
- m_audiosLanguageOrder = s.m_audiosLanguageOrder;
+ m_subtitlesLanguageOrder = s.strSubtitlesLanguageOrder;
+ m_audiosLanguageOrder = s.strAudiosLanguageOrder;
UpdateData(FALSE);
@@ -136,8 +136,8 @@ BOOL CPPagePlayback::OnApply()
s.fAutoloadSubtitles = !!m_fAutoloadSubtitles;
s.fEnableWorkerThreadForOpening = !!m_fEnableWorkerThreadForOpening;
s.fReportFailedPins = !!m_fReportFailedPins;
- s.m_subtitlesLanguageOrder = m_subtitlesLanguageOrder;
- s.m_audiosLanguageOrder = m_audiosLanguageOrder;
+ s.strSubtitlesLanguageOrder = m_subtitlesLanguageOrder;
+ s.strAudiosLanguageOrder = m_audiosLanguageOrder;
return __super::OnApply();
}
diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp
index a64e6b202..344e106e5 100644
--- a/src/apps/mplayerc/PPagePlayer.cpp
+++ b/src/apps/mplayerc/PPagePlayer.cpp
@@ -102,7 +102,7 @@ BOOL CPPagePlayer::OnInitDialog()
m_fUseIni = ((CMPlayerCApp*)AfxGetApp())->IsIniValid();
m_fKeepHistory = s.fKeepHistory;
m_fHideCDROMsSubMenu = s.fHideCDROMsSubMenu;
- m_priority = s.priority != NORMAL_PRIORITY_CLASS;
+ m_priority = s.dwPriority != NORMAL_PRIORITY_CLASS;
m_fShowOSD = s.fShowOSD;
m_fRememberDVDPos = s.fRememberDVDPos;
m_fRememberFilePos = s.fRememberFilePos;
@@ -133,7 +133,7 @@ BOOL CPPagePlayer::OnApply()
s.fSnapToDesktopEdges = !!m_fSnapToDesktopEdges;
s.fKeepHistory = !!m_fKeepHistory;
s.fHideCDROMsSubMenu = !!m_fHideCDROMsSubMenu;
- s.priority = !m_priority ? NORMAL_PRIORITY_CLASS : GetVersion() < 0 ? HIGH_PRIORITY_CLASS : ABOVE_NORMAL_PRIORITY_CLASS;
+ s.dwPriority = !m_priority ? NORMAL_PRIORITY_CLASS : GetVersion() < 0 ? HIGH_PRIORITY_CLASS : ABOVE_NORMAL_PRIORITY_CLASS;
s.fShowOSD = !!m_fShowOSD;
s.fLimitWindowProportions = !!m_fLimitWindowProportions;
s.fRememberDVDPos = m_fRememberDVDPos ? true : false;
@@ -149,7 +149,7 @@ BOOL CPPagePlayer::OnApply()
((CMainFrame*)AfxGetMainWnd())->ShowTrayIcon(s.fTrayIcon);
- ::SetPriorityClass(::GetCurrentProcess(), s.priority);
+ ::SetPriorityClass(::GetCurrentProcess(), s.dwPriority);
GetDlgItem(IDC_FILE_POS)->EnableWindow(s.fKeepHistory);
GetDlgItem(IDC_DVD_POS)->EnableWindow(s.fKeepHistory);
diff --git a/src/apps/mplayerc/PPageSheet.cpp b/src/apps/mplayerc/PPageSheet.cpp
index 8e3ae22c1..39d565941 100644
--- a/src/apps/mplayerc/PPageSheet.cpp
+++ b/src/apps/mplayerc/PPageSheet.cpp
@@ -63,7 +63,7 @@ CPPageSheet::CPPageSheet(LPCTSTR pszCaption, IFilterGraph* pFG, CWnd* pParentWnd
SetTreeViewMode(TRUE, TRUE, FALSE);
if(!idPage)
- idPage = AfxGetAppSettings().iLastUsedPage;
+ idPage = AfxGetAppSettings().nLastUsedPage;
if(idPage)
{
for(int i = 0; i < GetPageCount(); i++)
diff --git a/src/apps/mplayerc/PPageSubMisc.cpp b/src/apps/mplayerc/PPageSubMisc.cpp
index f41e757e7..329c0afa4 100644
--- a/src/apps/mplayerc/PPageSubMisc.cpp
+++ b/src/apps/mplayerc/PPageSubMisc.cpp
@@ -61,9 +61,9 @@ BOOL CPPageSubMisc::OnInitDialog()
m_fPrioritizeExternalSubtitles = s.fPrioritizeExternalSubtitles;
m_fDisableInternalSubtitles = s.fDisableInternalSubtitles;
- m_szAutoloadPaths = s.szSubtitlePaths;
+ m_szAutoloadPaths = s.strSubtitlePaths;
- m_ISDb = s.ISDb;
+ m_ISDb = s.strISDb;
m_ISDbCombo.AddString(m_ISDb);
if(m_ISDb.CompareNoCase(_T("www.opensubtitles.org/isdb")))
m_ISDbCombo.AddString(_T("www.opensubtitles.org/isdb"));
@@ -81,10 +81,10 @@ BOOL CPPageSubMisc::OnApply()
s.fPrioritizeExternalSubtitles = m_fPrioritizeExternalSubtitles;
s.fDisableInternalSubtitles = m_fDisableInternalSubtitles;
- s.szSubtitlePaths = m_szAutoloadPaths;
+ s.strSubtitlePaths = m_szAutoloadPaths;
- s.ISDb = m_ISDb;
- s.ISDb.TrimRight('/');
+ s.strISDb = m_ISDb;
+ s.strISDb.TrimRight('/');
return __super::OnApply();
}
@@ -101,7 +101,7 @@ void CPPageSubMisc::OnBnClickedButton1()
UpdateData();
AppSettings& s = AfxGetAppSettings();
- m_szAutoloadPaths = s.szSubtitlePaths;
+ m_szAutoloadPaths = s.strSubtitlePaths;
UpdateData(FALSE);
}
diff --git a/src/apps/mplayerc/PPageTweaks.cpp b/src/apps/mplayerc/PPageTweaks.cpp
index 39a7e491b..4c79b9aab 100644
--- a/src/apps/mplayerc/PPageTweaks.cpp
+++ b/src/apps/mplayerc/PPageTweaks.cpp
@@ -96,12 +96,12 @@ BOOL CPPageTweaks::OnInitDialog()
m_fNotifyMSN = s.fNotifyMSN;
m_fNotifyGTSdll = s.fNotifyGTSdll;
- m_fPreventMinimize = s.m_fPreventMinimize;
- m_fUseWin7TaskBar = s.m_fUseWin7TaskBar;
- m_fDontUseSearchInFolder =s.m_fDontUseSearchInFolder;
+ m_fPreventMinimize = s.fPreventMinimize;
+ m_fUseWin7TaskBar = s.fUseWin7TaskBar;
+ m_fDontUseSearchInFolder =s.fDontUseSearchInFolder;
- m_OSD_Size = s.nOSD_Size;
- m_OSD_Font = s.m_OSD_Font;
+ m_OSD_Size = s.nOSDSize;
+ m_OSD_Font = s.strOSDFont;
CString str;
int iSel = 0;
@@ -151,11 +151,11 @@ BOOL CPPageTweaks::OnApply()
s.fNotifyMSN = !!m_fNotifyMSN;
s.fNotifyGTSdll = !!m_fNotifyGTSdll;
- s.m_fPreventMinimize = m_fPreventMinimize;
- s.m_fUseWin7TaskBar = m_fUseWin7TaskBar;
- s.m_fDontUseSearchInFolder = m_fDontUseSearchInFolder;
- s.nOSD_Size = m_OSD_Size;
- m_FontType.GetLBText(m_FontType.GetCurSel(),s.m_OSD_Font);
+ s.fPreventMinimize = m_fPreventMinimize;
+ s.fUseWin7TaskBar = m_fUseWin7TaskBar;
+ s.fDontUseSearchInFolder = m_fDontUseSearchInFolder;
+ s.nOSDSize = m_OSD_Size;
+ m_FontType.GetLBText(m_FontType.GetCurSel(),s.strOSDFont);
CMainFrame* pFrame = ((CMainFrame*)GetParentFrame());
if(m_fUseWin7TaskBar) pFrame->CreateThumbnailToolbar();
diff --git a/src/apps/mplayerc/PPageWebServer.cpp b/src/apps/mplayerc/PPageWebServer.cpp
index 2f0749259..0b3ba27bf 100644
--- a/src/apps/mplayerc/PPageWebServer.cpp
+++ b/src/apps/mplayerc/PPageWebServer.cpp
@@ -100,11 +100,11 @@ BOOL CPPageWebServer::OnInitDialog()
m_fWebServerPrintDebugInfo = s.fWebServerPrintDebugInfo;
m_fWebServerLocalhostOnly = s.fWebServerLocalhostOnly;
m_fWebServerUseCompression = s.fWebServerUseCompression;
- m_fWebRoot = s.WebRoot.Find('*') < 0;
- m_WebRoot = s.WebRoot;
+ m_fWebRoot = s.strWebRoot.Find('*') < 0;
+ m_WebRoot = s.strWebRoot;
m_WebRoot.TrimLeft(_T("*"));
- m_WebDefIndex = s.WebDefIndex;
- m_WebServerCGI = s.WebServerCGI;
+ m_WebDefIndex = s.strWebDefIndex;
+ m_WebServerCGI = s.strWebServerCGI;
UpdateData(FALSE);
@@ -124,16 +124,16 @@ BOOL CPPageWebServer::OnApply()
if(!m_fWebRoot) NewWebRoot = _T("*") + NewWebRoot;
bool fRestart = s.nWebServerPort != m_nWebServerPort
- || s.WebRoot != NewWebRoot || s.WebServerCGI != m_WebServerCGI;
+ || s.strWebRoot != NewWebRoot || s.strWebServerCGI != m_WebServerCGI;
s.fEnableWebServer = !!m_fEnableWebServer;
s.nWebServerPort = m_nWebServerPort;
s.fWebServerPrintDebugInfo = !!m_fWebServerPrintDebugInfo;
s.fWebServerLocalhostOnly = !!m_fWebServerLocalhostOnly;
s.fWebServerUseCompression = !!m_fWebServerUseCompression;
- s.WebRoot = NewWebRoot;
- s.WebDefIndex = m_WebDefIndex;
- s.WebServerCGI = m_WebServerCGI;
+ s.strWebRoot = NewWebRoot;
+ s.strWebDefIndex = m_WebDefIndex;
+ s.strWebServerCGI = m_WebServerCGI;
if(CMainFrame* pWnd = (CMainFrame*)AfxGetMainWnd())
{
diff --git a/src/apps/mplayerc/PlayerCaptureDialog.cpp b/src/apps/mplayerc/PlayerCaptureDialog.cpp
index b9a35af7e..cebe187e1 100644
--- a/src/apps/mplayerc/PlayerCaptureDialog.cpp
+++ b/src/apps/mplayerc/PlayerCaptureDialog.cpp
@@ -45,7 +45,7 @@ static bool LoadMediaType(CStringW DisplayName, AM_MEDIA_TYPE** ppmt)
BYTE* pData;
UINT len;
- if(AfxGetApp()->GetProfileBinary(_T("Capture\\") + CString(DisplayName), _T("MediaType"), &pData, &len))
+ if(AfxGetApp()->GetProfileBinary(IDS_RS_CAPTURE _T("\\") + CString(DisplayName), _T("MediaType"), &pData, &len))
{
if ( len != sizeof(AM_MEDIA_TYPE) )
{
@@ -60,7 +60,7 @@ static bool LoadMediaType(CStringW DisplayName, AM_MEDIA_TYPE** ppmt)
fRet = true;
- if(AfxGetApp()->GetProfileBinary(_T("Capture\\") + CString(DisplayName), _T("Format"), &pData, &len))
+ if(AfxGetApp()->GetProfileBinary(IDS_RS_CAPTURE _T("\\") + CString(DisplayName), _T("Format"), &pData, &len))
{
if ( !len )
{
@@ -82,8 +82,8 @@ static void SaveMediaType(CStringW DisplayName, AM_MEDIA_TYPE* pmt)
{
if(DisplayName.IsEmpty() || !pmt) return;
- AfxGetApp()->WriteProfileBinary(_T("Capture\\") + CString(DisplayName), _T("MediaType"), (BYTE*)pmt, sizeof(AM_MEDIA_TYPE));
- AfxGetApp()->WriteProfileBinary(_T("Capture\\") + CString(DisplayName), _T("Format"), pmt->pbFormat, pmt->cbFormat);
+ AfxGetApp()->WriteProfileBinary(IDS_RS_CAPTURE _T("\\") + CString(DisplayName), _T("MediaType"), (BYTE*)pmt, sizeof(AM_MEDIA_TYPE));
+ AfxGetApp()->WriteProfileBinary(IDS_RS_CAPTURE _T("\\") + CString(DisplayName), _T("Format"), pmt->pbFormat, pmt->cbFormat);
}
static void LoadDefaultCodec(CAtlArray<Codec>& codecs, CComboBox& box, const GUID& cat)
@@ -93,7 +93,7 @@ static void LoadDefaultCodec(CAtlArray<Codec>& codecs, CComboBox& box, const GUI
if(cat == GUID_NULL) return;
- CString DisplayName = AfxGetApp()->GetProfileString(_T("Capture\\") + CStringFromGUID(cat), _T("DisplayName"));
+ CString DisplayName = AfxGetApp()->GetProfileString(IDS_RS_CAPTURE _T("\\") + CStringFromGUID(cat), _T("DisplayName"));
for(int i = 0; i < len; i++)
{
@@ -117,7 +117,7 @@ static void SaveDefaultCodec(CAtlArray<Codec>& codecs, CComboBox& box, const GUI
CString guid = CStringFromGUID(cat);
- AfxGetApp()->WriteProfileString(_T("Capture\\") + guid, NULL, NULL);
+ AfxGetApp()->WriteProfileString(IDS_RS_CAPTURE _T("\\") + guid, NULL, NULL);
int iSel = box.GetCurSel();
if(iSel < 0) return;
@@ -126,7 +126,7 @@ static void SaveDefaultCodec(CAtlArray<Codec>& codecs, CComboBox& box, const GUI
Codec& codec = codecs[iSel];
- AfxGetApp()->WriteProfileString(_T("Capture\\") + guid, _T("DisplayName"), CString(codec.DisplayName));
+ AfxGetApp()->WriteProfileString(IDS_RS_CAPTURE _T("\\") + guid, _T("DisplayName"), CString(codec.DisplayName));
}
static void SetupDefaultCaps(AM_MEDIA_TYPE* pmt, VIDEO_STREAM_CONFIG_CAPS& caps)
@@ -595,7 +595,7 @@ void CPlayerCaptureDialog::EmptyVideo()
{
long lChannel = 0, lVivSub = 0, lAudSub = 0;
m_pAMTuner->get_Channel(&lChannel, &lVivSub, &lAudSub);
- AfxGetApp()->WriteProfileInt(_T("Capture\\") + CString(m_VidDisplayName), _T("Channel"), lChannel);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE _T("\\") + CString(m_VidDisplayName), _T("Channel"), lChannel);
}
//
@@ -1293,15 +1293,15 @@ BOOL CPlayerCaptureDialog::OnInitDialog()
m_fEnableOgm = IsCLSIDRegistered(_T("{8cae96b7-85b1-4605-b23c-17ff5262b296}"));
- m_nVidBuffers = AfxGetApp()->GetProfileInt(_T("Capture"), _T("VidBuffers"), 50);
- m_nAudBuffers = AfxGetApp()->GetProfileInt(_T("Capture"), _T("AudBuffers"), 50);
- m_fVidOutput = !!AfxGetApp()->GetProfileInt(_T("Capture"), _T("VidOutput"), TRUE);
- m_fAudOutput = !!AfxGetApp()->GetProfileInt(_T("Capture"), _T("AudOutput"), TRUE);
- m_fVidPreview = AfxGetApp()->GetProfileInt(_T("Capture"), _T("VidPreview"), TRUE);
- m_fAudPreview = AfxGetApp()->GetProfileInt(_T("Capture"), _T("AudPreview"), TRUE);
- m_muxtype = AfxGetApp()->GetProfileInt(_T("Capture"), _T("FileFormat"), 0);
- m_file = AfxGetApp()->GetProfileString(_T("Capture"), _T("FileName"), _T(""));
- m_fSepAudio = AfxGetApp()->GetProfileInt(_T("Capture"), _T("SepAudio"), TRUE);
+ m_nVidBuffers = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("VidBuffers"), 50);
+ m_nAudBuffers = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("AudBuffers"), 50);
+ m_fVidOutput = !!AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("VidOutput"), TRUE);
+ m_fAudOutput = !!AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("AudOutput"), TRUE);
+ m_fVidPreview = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("VidPreview"), TRUE);
+ m_fAudPreview = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("AudPreview"), TRUE);
+ m_muxtype = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("FileFormat"), 0);
+ m_file = AfxGetApp()->GetProfileString(IDS_RS_CAPTURE, _T("FileName"), _T(""));
+ m_fSepAudio = AfxGetApp()->GetProfileInt(IDS_RS_CAPTURE, _T("SepAudio"), TRUE);
m_muxctrl.AddString(_T("AVI"));
m_muxctrl.AddString(_T("Ogg Media"));
@@ -1322,13 +1322,13 @@ void CPlayerCaptureDialog::OnDestroy()
{
UpdateData();
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("VidOutput"), m_fVidOutput);
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("AudOutput"), m_fAudOutput);
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("VidPreview"), m_fVidPreview);
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("AudPreview"), m_fAudPreview);
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("FileFormat"), m_muxtype);
- AfxGetApp()->WriteProfileString(_T("Capture"), _T("FileName"), m_file);
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("SepAudio"), m_fSepAudio);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("VidOutput"), m_fVidOutput);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("AudOutput"), m_fAudOutput);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("VidPreview"), m_fVidPreview);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("AudPreview"), m_fAudPreview);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("FileFormat"), m_muxtype);
+ AfxGetApp()->WriteProfileString(IDS_RS_CAPTURE, _T("FileName"), m_file);
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("SepAudio"), m_fSepAudio);
__super::OnDestroy();
}
@@ -1646,13 +1646,13 @@ void CPlayerCaptureDialog::OnRecord()
void CPlayerCaptureDialog::OnEnChangeEdit9()
{
UpdateData();
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("VidBuffers"), max(m_nVidBuffers, 0));
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("VidBuffers"), max(m_nVidBuffers, 0));
}
void CPlayerCaptureDialog::OnEnChangeEdit12()
{
UpdateData();
- AfxGetApp()->WriteProfileInt(_T("Capture"), _T("AudBuffers"), max(m_nAudBuffers, 0));
+ AfxGetApp()->WriteProfileInt(IDS_RS_CAPTURE, _T("AudBuffers"), max(m_nAudBuffers, 0));
}
void CPlayerCaptureDialog::OnTimer(UINT_PTR nIDEvent)
diff --git a/src/apps/mplayerc/PlayerNavigationDialog.cpp b/src/apps/mplayerc/PlayerNavigationDialog.cpp
index 9bdda472a..6dccb27d5 100644
--- a/src/apps/mplayerc/PlayerNavigationDialog.cpp
+++ b/src/apps/mplayerc/PlayerNavigationDialog.cpp
@@ -121,11 +121,11 @@ void CPlayerNavigationDialog::SetupAudioSwitcherSubMenu(CDVBChannel* pChannel)
if (!pChannel)
{
- nCurrentChannel = s.DVBLastChannel;
- POSITION pos = s.DVBChannels.GetHeadPosition();
+ nCurrentChannel = s.nDVBLastChannel;
+ POSITION pos = s.m_DVBChannels.GetHeadPosition();
while (pos && !bFound)
{
- pChannel = &s.DVBChannels.GetNext(pos);
+ pChannel = &s.m_DVBChannels.GetNext(pos);
if (nCurrentChannel == pChannel->GetPrefNumber())
{
bFound = TRUE;
@@ -158,12 +158,12 @@ void CPlayerNavigationDialog::UpdateElementList()
{
m_ChannelList.ResetContent();
- nCurrentChannel = s.DVBLastChannel;
+ nCurrentChannel = s.nDVBLastChannel;
- POSITION pos = s.DVBChannels.GetHeadPosition();
+ POSITION pos = s.m_DVBChannels.GetHeadPosition();
while (pos)
{
- CDVBChannel& Channel = s.DVBChannels.GetNext(pos);
+ CDVBChannel& Channel = s.m_DVBChannels.GetNext(pos);
if ((m_bTVStations && (Channel.GetVideoPID() != 0)) ||
(!m_bTVStations && (Channel.GetAudioCount() > 0)) && (Channel.GetVideoPID() == 0))
{
@@ -208,7 +208,7 @@ void CPlayerNavigationDialog::OnSelChangeComboAudio()
UINT nID;
CWnd* TempWnd;
AppSettings& s = AfxGetAppSettings();
- CDVBChannel* pChannel = s.FindChannelByPref(s.DVBLastChannel);
+ CDVBChannel* pChannel = s.FindChannelByPref(s.nDVBLastChannel);
nID = m_ComboAudio.GetCurSel() + ID_NAVIGATE_AUDIO_SUBITEM_START;
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp
index 319d6d065..e81762c72 100644
--- a/src/apps/mplayerc/PlayerPlaylistBar.cpp
+++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp
@@ -144,7 +144,7 @@ static bool SearchFiles(CString mask, CAtlList<CString>& sl)
mask.Trim();
sl.RemoveAll();
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
WIN32_FILE_ATTRIBUTE_DATA fad;
bool fFilterKnownExts = (GetFileAttributesEx(mask, GetFileExInfoStandard, &fad)
diff --git a/src/apps/mplayerc/PlayerSeekBar.cpp b/src/apps/mplayerc/PlayerSeekBar.cpp
index e9adf8e6a..93ca04c90 100644
--- a/src/apps/mplayerc/PlayerSeekBar.cpp
+++ b/src/apps/mplayerc/PlayerSeekBar.cpp
@@ -113,7 +113,7 @@ void CPlayerSeekBar::SetPosInternal(__int64 pos)
InvalidateRect(before | after);
CMainFrame* pFrame = ((CMainFrame*)GetParentFrame());
- if((AfxGetAppSettings().m_fUseWin7TaskBar)&&(pFrame->m_pTaskbarList))
+ if((AfxGetAppSettings().fUseWin7TaskBar)&&(pFrame->m_pTaskbarList))
pFrame->m_pTaskbarList->SetProgressValue ( pFrame->m_hWnd, pos, m_stop );
}
}
diff --git a/src/apps/mplayerc/Playlist.cpp b/src/apps/mplayerc/Playlist.cpp
index ea7b62c38..c83b1acb4 100644
--- a/src/apps/mplayerc/Playlist.cpp
+++ b/src/apps/mplayerc/Playlist.cpp
@@ -39,6 +39,7 @@ CPlaylistItem::CPlaylistItem()
, m_vinput(-1)
, m_vchannel(-1)
, m_ainput(-1)
+ , m_country(0)
{
m_id = m_globalid++;
}
@@ -153,7 +154,7 @@ void CPlaylistItem::AutoLoadFiles()
int i = fn.ReverseFind('.');
if(i > 0)
{
- CMediaFormats& mf = AfxGetAppSettings().Formats;
+ CMediaFormats& mf = AfxGetAppSettings().m_Formats;
CString ext = fn.Mid(i+1).MakeLower();
@@ -189,7 +190,7 @@ void CPlaylistItem::AutoLoadFiles()
if(AfxGetAppSettings().fAutoloadSubtitles)
{
- CString& pathList = AfxGetAppSettings().szSubtitlePaths;
+ CString& pathList = AfxGetAppSettings().strSubtitlePaths;
CAtlArray<CString> paths;
@@ -349,7 +350,7 @@ void CPlaylist::Randomize()
}
}
-POSITION CPlaylist::GetPos()
+POSITION CPlaylist::GetPos() const
{
return(m_pos);
}
diff --git a/src/apps/mplayerc/Playlist.h b/src/apps/mplayerc/Playlist.h
index 22b50c494..2f8ccf456 100644
--- a/src/apps/mplayerc/Playlist.h
+++ b/src/apps/mplayerc/Playlist.h
@@ -70,7 +70,7 @@ public:
void SortById(), SortByName(), SortByPath(), Randomize();
- POSITION GetPos();
+ POSITION GetPos() const;
void SetPos(POSITION pos);
CPlaylistItem& GetNextWrap(POSITION& pos);
CPlaylistItem& GetPrevWrap(POSITION& pos);
diff --git a/src/apps/mplayerc/SaveDlg.cpp b/src/apps/mplayerc/SaveDlg.cpp
index f1b3953e0..5c5541008 100644
--- a/src/apps/mplayerc/SaveDlg.cpp
+++ b/src/apps/mplayerc/SaveDlg.cpp
@@ -25,7 +25,6 @@
#include "mplayerc.h"
#include "SaveDlg.h"
#include "../../filters/filters.h"
-#include "internal_filter_config.h"
// CSaveDlg dialog
diff --git a/src/apps/mplayerc/ShaderCombineDlg.cpp b/src/apps/mplayerc/ShaderCombineDlg.cpp
index 9c938b39c..02f684e61 100644
--- a/src/apps/mplayerc/ShaderCombineDlg.cpp
+++ b/src/apps/mplayerc/ShaderCombineDlg.cpp
@@ -72,9 +72,9 @@ BOOL CShaderCombineDlg::OnInitDialog()
CString str;
if (m_bScreenSpace)
- str = s.m_shadercombineScreenSpace.Trim();
+ str = s.strShadercombineScreenSpace.Trim();
else
- str = s.m_shadercombine.Trim();
+ str = s.strShadercombine.Trim();
CAtlList<CString> sl;
if(!str.IsEmpty()) Explode(str, sl, '|');
@@ -105,9 +105,9 @@ void CShaderCombineDlg::OnOK()
}
if (m_bScreenSpace)
- AfxGetAppSettings().m_shadercombineScreenSpace = Implode(sl, '|');
+ AfxGetAppSettings().strShadercombineScreenSpace = Implode(sl, '|');
else
- AfxGetAppSettings().m_shadercombine = Implode(sl, '|');
+ AfxGetAppSettings().strShadercombine = Implode(sl, '|');
__super::OnOK();
}
diff --git a/src/apps/mplayerc/TunerScanDlg.cpp b/src/apps/mplayerc/TunerScanDlg.cpp
index d15f81d0d..a70a9ca91 100644
--- a/src/apps/mplayerc/TunerScanDlg.cpp
+++ b/src/apps/mplayerc/TunerScanDlg.cpp
@@ -48,12 +48,12 @@ CTunerScanDlg::CTunerScanDlg(CWnd* pParent /*=NULL*/)
{
AppSettings& s = AfxGetAppSettings();
- m_ulFrequencyStart = s.BDAScanFreqStart;
- m_ulFrequencyEnd = s.BDAScanFreqEnd;
- m_ulBandwidth = s.BDABandwidth*1000;
- m_bUseOffset = s.BDAUseOffset;
- m_lOffset = s.BDAOffset;
- m_bIgnoreEncryptedChannels = s.BDAIgnoreEncryptedChannels;
+ m_ulFrequencyStart = s.iBDAScanFreqStart;
+ m_ulFrequencyEnd = s.iBDAScanFreqEnd;
+ m_ulBandwidth = s.iBDABandwidth*1000;
+ m_bUseOffset = s.fBDAUseOffset;
+ m_lOffset = s.iBDAOffset;
+ m_bIgnoreEncryptedChannels = s.fBDAIgnoreEncryptedChannels;
}
CTunerScanDlg::~CTunerScanDlg()
@@ -117,14 +117,14 @@ END_MESSAGE_MAP()
void CTunerScanDlg::OnBnClickedSave()
{
AppSettings& s = AfxGetAppSettings();
- s.DVBChannels.RemoveAll();
+ s.m_DVBChannels.RemoveAll();
for (int i=0; i <m_ChannelList.GetItemCount(); i++)
{
CDVBChannel Channel;
Channel.FromString (m_ChannelList.GetItemText (i, TSCC_CHANNEL));
Channel.SetPrefNumber(i);
- s.DVBChannels.AddTail (Channel);
+ s.m_DVBChannels.AddTail (Channel);
}
OnOK();
@@ -250,11 +250,11 @@ void CTunerScanDlg::SaveScanSettings()
{
AppSettings& s = AfxGetAppSettings();
- s.BDAScanFreqStart = m_ulFrequencyStart;
- s.BDAScanFreqEnd = m_ulFrequencyEnd;
+ s.iBDAScanFreqStart = m_ulFrequencyStart;
+ s.iBDAScanFreqEnd = m_ulFrequencyEnd;
div_t bdw = div(m_ulBandwidth, 1000);
- s.BDABandwidth = bdw.quot;
- s.BDAUseOffset = m_bUseOffset;
- s.BDAOffset = m_lOffset;
- s.BDAIgnoreEncryptedChannels = m_bIgnoreEncryptedChannels;
+ s.iBDABandwidth = bdw.quot;
+ s.fBDAUseOffset = m_bUseOffset;
+ s.iBDAOffset = m_lOffset;
+ s.fBDAIgnoreEncryptedChannels = m_bIgnoreEncryptedChannels;
}
diff --git a/src/apps/mplayerc/VMROSD.cpp b/src/apps/mplayerc/VMROSD.cpp
index 6aed5602b..5d803a3f7 100644
--- a/src/apps/mplayerc/VMROSD.cpp
+++ b/src/apps/mplayerc/VMROSD.cpp
@@ -388,7 +388,7 @@ bool CVMROSD::OnLButtonUp(UINT nFlags, CPoint point)
return bRet;
}
-__int64 CVMROSD::GetPos()
+__int64 CVMROSD::GetPos() const
{
return m_llSeekPos;
}
@@ -459,10 +459,10 @@ void CVMROSD::DisplayMessage (OSD_MESSAGEPOS nPos, LPCTSTR strMsg, int nDuration
int temp_m_FontSize = m_FontSize;
CString temp_m_OSD_Font = m_OSD_Font;
- if (FontSize == 0) m_FontSize = AfxGetAppSettings().nOSD_Size;
+ if (FontSize == 0) m_FontSize = AfxGetAppSettings().nOSDSize;
else m_FontSize = FontSize;
if (m_FontSize<10 || m_FontSize>26) m_FontSize=20;
- if (OSD_Font == _T("")) m_OSD_Font = AfxGetAppSettings().m_OSD_Font;
+ if (OSD_Font == _T("")) m_OSD_Font = AfxGetAppSettings().strOSDFont;
else m_OSD_Font = OSD_Font;
if((temp_m_FontSize != m_FontSize) || (temp_m_OSD_Font != m_OSD_Font))
diff --git a/src/apps/mplayerc/VMROSD.h b/src/apps/mplayerc/VMROSD.h
index 6462045df..a2f538a8d 100644
--- a/src/apps/mplayerc/VMROSD.h
+++ b/src/apps/mplayerc/VMROSD.h
@@ -63,7 +63,7 @@ public:
void DebugMessage( LPCTSTR format, ... );
void ClearMessage();
- __int64 GetPos();
+ __int64 GetPos() const;
void SetPos(__int64 pos);
void SetRange(__int64 start, __int64 stop);
void GetRange(__int64& start, __int64& stop);
diff --git a/src/apps/mplayerc/WebServer.cpp b/src/apps/mplayerc/WebServer.cpp
index 90d24ebdf..3859340ec 100644
--- a/src/apps/mplayerc/WebServer.cpp
+++ b/src/apps/mplayerc/WebServer.cpp
@@ -120,7 +120,7 @@ CWebServer::CWebServer(CMainFrame* pMainFrame, int nPort)
m_webroot = CPath(str);
m_webroot.RemoveFileSpec();
- CString WebRoot = AfxGetAppSettings().WebRoot;
+ CString WebRoot = AfxGetAppSettings().strWebRoot;
WebRoot.Replace('/', '\\');
WebRoot.Trim();
CPath p(WebRoot);
@@ -131,7 +131,7 @@ CWebServer::CWebServer(CMainFrame* pMainFrame, int nPort)
if(!m_webroot.IsDirectory()) m_webroot = CPath();
CAtlList<CString> sl;
- Explode(AfxGetAppSettings().WebServerCGI, sl, ';');
+ Explode(AfxGetAppSettings().strWebServerCGI, sl, ';');
POSITION pos = sl.GetHeadPosition();
while(pos)
{
@@ -222,7 +222,7 @@ bool CWebServer::ToLocalPath(CString& path, CString& redir)
if(p.IsDirectory())
{
CAtlList<CString> sl;
- Explode(AfxGetAppSettings().WebDefIndex, sl, ';');
+ Explode(AfxGetAppSettings().strWebDefIndex, sl, ';');
POSITION pos = sl.GetHeadPosition();
while(pos)
{
diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp
index 255806e08..b2de4f796 100644
--- a/src/apps/mplayerc/mplayerc.cpp
+++ b/src/apps/mplayerc/mplayerc.cpp
@@ -23,7 +23,6 @@
#include "stdafx.h"
#include "mplayerc.h"
-#include <atlsync.h>
#include <Tlhelp32.h>
#include "MainFrm.h"
#include "../../DSUtil/DSUtil.h"
@@ -31,9 +30,6 @@
#include "FileVersionInfo.h"
#include <psapi.h>
#include "Ifo.h"
-#include "MiniDump.h"
-#include "SettingsDefines.h"
-#include "internal_filter_config.h"
#include "Monitors.h"
#include "..\..\..\include\Version.h"
@@ -349,7 +345,7 @@ CMPlayerCApp::CMPlayerCApp()
GetRemoteControlCode = GetRemoteControlCodeMicrosoft;
}
-void CMPlayerCApp::ShowCmdlnSwitches()
+void CMPlayerCApp::ShowCmdlnSwitches() const
{
CString s;
@@ -386,6 +382,28 @@ bool CMPlayerCApp::StoreSettingsToIni()
free((void*)m_pszProfileName);
m_pszProfileName = _tcsdup(ini);
+ // We can only use UTF16-LE for unicode ini files in windows. UTF8/UTF16-BE do not work.
+ // So to ensure we have correct encoding for ini files, create a file with right BOM first,
+ // then add some comments in first line to make sure it's not empty.
+
+ // If you want to try unicode ini, uncomment following code block.
+ /*
+ if(!::PathFileExists(m_pszProfileName)) // don't overwrite existing ini file
+ {
+ LPTSTR pszComments = _T("; Media Player Classic - Home Cinema");
+ WORD wBOM = 0xFEFF;// UTF16-LE BOM(FFFE)
+ DWORD nBytes;
+
+ HANDLE hFile = ::CreateFile(m_pszProfileName, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
+ if(hFile != INVALID_HANDLE_VALUE)
+ {
+ ::WriteFile(hFile, &wBOM, sizeof(WORD), &nBytes, NULL);
+ ::WriteFile(hFile, pszComments, (_tcslen(pszComments)+1)*(sizeof(TCHAR)), &nBytes, NULL);
+ ::CloseHandle(hFile);
+ }
+ }
+ */
+
return(true);
}
@@ -401,7 +419,7 @@ bool CMPlayerCApp::StoreSettingsToRegistry()
return(true);
}
-CString CMPlayerCApp::GetIniPath()
+CString CMPlayerCApp::GetIniPath() const
{
CString path;
GetModuleFileName(AfxGetInstanceHandle(), path.GetBuffer(_MAX_PATH), _MAX_PATH);
@@ -410,7 +428,7 @@ CString CMPlayerCApp::GetIniPath()
return(path);
}
-bool CMPlayerCApp::IsIniValid()
+bool CMPlayerCApp::IsIniValid() const
{
CFileStatus fs;
return CFileGetStatus(GetIniPath(), fs) && fs.m_size > 0;
@@ -934,7 +952,7 @@ BOOL CMPlayerCApp::InitInstance()
if((m_s.nCLSwitches&CLSW_REGEXTVID) || (m_s.nCLSwitches&CLSW_REGEXTAUD))
{
- CMediaFormats& mf = m_s.Formats;
+ CMediaFormats& mf = m_s.m_Formats;
for(int i = 0; i < (int)mf.GetCount(); i++)
{
@@ -959,7 +977,7 @@ BOOL CMPlayerCApp::InitInstance()
if((m_s.nCLSwitches&CLSW_UNREGEXT))
{
- CMediaFormats& mf = m_s.Formats;
+ CMediaFormats& mf = m_s.m_Formats;
for(int i = 0; i < (int)mf.GetCount(); i++)
{
@@ -1054,9 +1072,9 @@ BOOL CMPlayerCApp::InitInstance()
pFrame->UpdateWindow();
pFrame->m_hAccelTable = m_s.hAccel;
m_s.WinLircClient.SetHWND(m_pMainWnd->m_hWnd);
- if(m_s.fWinLirc) m_s.WinLircClient.Connect(m_s.WinLircAddr);
+ if(m_s.fWinLirc) m_s.WinLircClient.Connect(m_s.strWinLircAddr);
m_s.UIceClient.SetHWND(m_pMainWnd->m_hWnd);
- if(m_s.fUIce) m_s.UIceClient.Connect(m_s.UIceAddr);
+ if(m_s.fUIce) m_s.UIceClient.Connect(m_s.strUIceAddr);
SendCommandLine(m_pMainWnd->m_hWnd);
RegisterHotkeys();
diff --git a/src/apps/mplayerc/mplayerc.h b/src/apps/mplayerc/mplayerc.h
index ca58dafdc..e3c91ba27 100644
--- a/src/apps/mplayerc/mplayerc.h
+++ b/src/apps/mplayerc/mplayerc.h
@@ -30,11 +30,7 @@
#include "resource.h" // main symbols
#include <afxadv.h>
#include <atlsync.h>
-#include "../../Subtitles/STS.h"
-#include "MediaFormats.h"
#include "FakeFilterMapper2.h"
-#include "DVBChannel.h"
-#include "RenderersSettings.h"
#include "AppSettings.h"
#define MPC_WND_CLASS_NAME L"MediaPlayerClassicW"
@@ -115,12 +111,12 @@ class CMPlayerCApp : public CWinApp
public:
CMPlayerCApp();
- void ShowCmdlnSwitches();
+ void ShowCmdlnSwitches() const;
bool StoreSettingsToIni();
bool StoreSettingsToRegistry();
- CString GetIniPath();
- bool IsIniValid();
+ CString GetIniPath() const;
+ bool IsIniValid() const;
bool GetAppSavePath(CString& path);