From: <man...@us...> - 2013-12-05 18:32:52
|
Revision: 3386 http://sourceforge.net/p/modplug/code/3386 Author: manxorist Date: 2013-12-05 18:32:43 +0000 (Thu, 05 Dec 2013) Log Message: ----------- [Ref] sounddev: Move description of the exclusive mode checkbox into SoundDeviceCaps. Modified Paths: -------------- trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-05 18:27:14 UTC (rev 3385) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-05 18:32:43 UTC (rev 3386) @@ -523,16 +523,7 @@ GetDlgItem(IDC_CHECK5)->EnableWindow(m_CurrentDeviceCaps.CanBoostThreadPriority ? TRUE : FALSE); GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE); GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE); - if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_DSOUND) - { - GetDlgItem(IDC_CHECK4)->SetWindowText("Use primary buffer"); - } else if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO) - { - GetDlgItem(IDC_CHECK4)->SetWindowText("Keep device running"); - } else - { - GetDlgItem(IDC_CHECK4)->SetWindowText("Use device exclusively"); - } + GetDlgItem(IDC_CHECK4)->SetWindowText(mpt::ToCString(m_CurrentDeviceCaps.ExclusiveModeDescription)); CheckDlgButton(IDC_CHECK4, m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED); CheckDlgButton(IDC_CHECK5, m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED); } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2013-12-05 18:27:14 UTC (rev 3385) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-12-05 18:32:43 UTC (rev 3386) @@ -308,6 +308,7 @@ bool CanUseHardwareTiming; bool CanChannelMapping; bool CanDriverPanel; + std::wstring ExclusiveModeDescription; SoundDeviceCaps() : currentSampleRate(0) , CanUpdateInterval(true) @@ -317,6 +318,7 @@ , CanUseHardwareTiming(false) , CanChannelMapping(false) , CanDriverPanel(false) + , ExclusiveModeDescription(L"Use device exclusively") { return; } Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-05 18:27:14 UTC (rev 3385) +++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-05 18:32:43 UTC (rev 3386) @@ -1197,6 +1197,7 @@ caps.CanUseHardwareTiming = true; caps.CanChannelMapping = true; caps.CanDriverPanel = true; + caps.ExclusiveModeDescription = L"Keep device running"; TemporaryASIODriverOpener opener(*this); if(!IsDriverOpen()) Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-12-05 18:27:14 UTC (rev 3385) +++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-12-05 18:32:43 UTC (rev 3386) @@ -121,6 +121,7 @@ caps.CanUseHardwareTiming = false; caps.CanChannelMapping = false; caps.CanDriverPanel = false; + caps.ExclusiveModeDescription = L"Use primary buffer"; IDirectSound *dummy = nullptr; IDirectSound *ds = nullptr; if(m_piDS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |