From: <rel...@us...> - 2009-06-08 21:23:56
|
Revision: 265 http://modplug.svn.sourceforge.net/modplug/?rev=265&view=rev Author: relabsoluness Date: 2009-06-08 21:22:25 +0000 (Mon, 08 Jun 2009) Log Message: ----------- . General tab: Fixes channel controls that got badly broken in rev. 263. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2009-06-08 19:25:03 UTC (rev 264) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2009-06-08 21:22:25 UTC (rev 265) @@ -662,7 +662,7 @@ short int pos; LockControls(); - const UINT nLoopLimit = pModDoc->GetSoundFile()->GetNumChannels() - nChn; + const UINT nLoopLimit = min(4, pModDoc->GetSoundFile()->GetNumChannels() - nChn); for (UINT iCh=0; iCh<nLoopLimit; iCh++) { // Volume sliders This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2011-07-01 20:00:45
|
Revision: 911 http://modplug.svn.sourceforge.net/modplug/?rev=911&view=rev Author: saga-games Date: 2011-07-01 20:00:39 +0000 (Fri, 01 Jul 2011) Log Message: ----------- [Fix] Revision 901 broke entering numbers into the pan fields on the general tab. Revision Links: -------------- http://modplug.svn.sourceforge.net/modplug/?rev=901&view=rev Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2011-07-01 18:50:13 UTC (rev 910) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2011-07-01 20:00:39 UTC (rev 911) @@ -636,7 +636,8 @@ { m_sbPan[chnMod4].SetPos(pan/4); pModDoc->UpdateAllViews(this, HINT_MODCHANNELS | (m_nActiveTab << HINT_SHIFT_CHNTAB)); - UpdateView(HINT_MODCHANNELS); + // Surround is forced off when changing pan, so uncheck the checkbox. + CheckDlgButton(IDC_CHECK2 + chnMod4 * 2, BST_UNCHECKED); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2015-02-26 23:26:11
|
Revision: 4794 http://sourceforge.net/p/modplug/code/4794 Author: saga-games Date: 2015-02-26 23:25:59 +0000 (Thu, 26 Feb 2015) Log Message: ----------- [Fix] Fix crashes introduced in previous commit Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2015-02-26 23:11:17 UTC (rev 4793) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2015-02-26 23:25:59 UTC (rev 4794) @@ -487,7 +487,6 @@ m_sbValue.EnableWindow(TRUE); m_sbDryRatio.EnableWindow(TRUE); GetDlgItem(IDC_EDIT14)->EnableWindow(TRUE); - GetDlgItem(IDC_BUTTON3)->EnableWindow(TRUE); } else { s[0] = 0; @@ -504,7 +503,6 @@ m_sbValue.EnableWindow(FALSE); m_sbDryRatio.EnableWindow(FALSE); GetDlgItem(IDC_EDIT14)->EnableWindow(FALSE); - GetDlgItem(IDC_BUTTON3)->EnableWindow(FALSE); } SetDlgItemText(IDC_TEXT6, s); int outputsel = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-04-24 17:16:24
|
Revision: 4019 http://sourceforge.net/p/modplug/code/4019 Author: saga-games Date: 2014-04-24 17:16:16 +0000 (Thu, 24 Apr 2014) Log Message: ----------- [Fix] Moving plugins unintentionally broke the plugin chain in many cases (http://bugs.openmpt.org/view.php?id=514). Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2014-04-22 22:22:40 UTC (rev 4018) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2014-04-24 17:16:16 UTC (rev 4019) @@ -148,7 +148,7 @@ int nMapMode = MM_TEXT; SIZE sizeTotal, sizePage, sizeLine; - m_nActiveTab = -1; + m_nActiveTab = CHANNELINDEX(-1); m_nCurrentPlugin = 0; m_nCurrentParam = 0; CFormView::OnInitialUpdate(); @@ -202,7 +202,7 @@ OnParamChanged(); m_nLockCount = 0; - + } @@ -298,7 +298,7 @@ CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; int nTabCount, nTabIndex; - + if (!pModDoc) return; if (!(dwHintMask & (HINT_MODTYPE|HINT_MODCHANNELS|HINT_MIXPLUGINS))) return; pSndFile = pModDoc->GetSoundFile(); @@ -319,10 +319,10 @@ m_TabCtrl.InsertItem(iItem, &tci); } if (nOldSel >= (UINT)nTabCount) nOldSel = 0; - + m_TabCtrl.SetRedraw(TRUE); m_TabCtrl.SetCurSel(nOldSel); - + InvalidateRect(NULL, FALSE); } nTabIndex = m_TabCtrl.GetCurSel(); @@ -330,7 +330,7 @@ if ((m_nActiveTab != nTabIndex) || (dwHintMask & (HINT_MODTYPE|HINT_MODCHANNELS))) { LockControls(); - m_nActiveTab = nTabIndex; + m_nActiveTab = static_cast<CHANNELINDEX>(nTabIndex); for (int ichn=0; ichn<4; ichn++) { const UINT nChn = nTabIndex*4+ichn; @@ -424,7 +424,7 @@ wsprintf(s, "(%d%% wet, %d%% dry)", 100-n, n); SetDlgItemText(IDC_STATIC8, s); m_sbDryRatio.SetPos(n); - + if(pVstPlugin && pVstPlugin->isInstrument()) { m_CbnSpecialMixProcessing.EnableWindow(FALSE); @@ -560,7 +560,7 @@ //---------------------------------------------------------------------- { CModDoc *pModDoc = GetDocument(); - + if (pModDoc) { const bool b = (IsDlgButtonChecked(itemID) != FALSE); @@ -580,7 +580,7 @@ //-------------------------------------------------------------------------- { CModDoc *pModDoc = GetDocument(); - + if (pModDoc) { const bool b = (IsDlgButtonChecked(itemID) != FALSE); @@ -658,7 +658,7 @@ { BOOL bUpdate = FALSE; short int pos; - + LockControls(); const CHANNELINDEX nLoopLimit = MIN(4, pModDoc->GetSoundFile()->GetNumChannels() - nChn); for (CHANNELINDEX iCh = 0; iCh < nLoopLimit; iCh++) @@ -692,12 +692,12 @@ { int n = m_sbDryRatio.GetPos(); if ((n >= 0) && (n <= 100) && (m_nCurrentPlugin < MAX_MIXPLUGINS)) - { + { CSoundFile *pSndFile = pModDoc->GetSoundFile(); SNDMIXPLUGIN &plugin = pSndFile->m_MixPlugins[m_nCurrentPlugin]; if(plugin.pMixPlugin) - { + { wsprintf(s, "(%d%% wet, %d%% dry)", 100 - n, n); SetDlgItemText(IDC_STATIC8, s); plugin.fDryRatio = static_cast<float>(n) / 100.0f; @@ -762,7 +762,7 @@ if(gain == 0) gain = 1; plugin.SetGain(gain); - + float fValue = 0.1f * (float)gain; sprintf(s,"Gain: x %1.1f",fValue); SetDlgItemText(IDC_STATIC2, s); @@ -786,7 +786,7 @@ CSoundFile *pSndFile = pModDoc->GetSoundFile(); CHAR s[MAX_CHANNELNAME + 2]; const UINT nChn = m_nActiveTab * 4 + chnMod4; - + MemsetZero(s); GetDlgItemText(itemID, s, CountOf(s)); s[MAX_CHANNELNAME+1] = 0; @@ -812,9 +812,9 @@ if (pModDoc) { CSoundFile *pSndFile = pModDoc->GetSoundFile(); - UINT nChn = m_nActiveTab * 4 + chnMod4; + CHANNELINDEX nChn = m_nActiveTab * 4 + chnMod4; int nfx = m_CbnEffects[chnMod4].GetItemData(m_CbnEffects[chnMod4].GetCurSel()); - if ((nfx >= 0) && (nfx <= MAX_MIXPLUGINS) && (nChn < pSndFile->m_nChannels) + if ((nfx >= 0) && (nfx <= MAX_MIXPLUGINS) && (nChn < pSndFile->GetNumChannels()) && (pSndFile->ChnSettings[nChn].nMixPlugin != (UINT)nfx)) { pSndFile->ChnSettings[nChn].nMixPlugin = (PLUGINDEX)nfx; @@ -904,7 +904,7 @@ if ((pModDoc) && (m_nCurrentPlugin < MAX_MIXPLUGINS)) { CSoundFile *pSndFile = pModDoc->GetSoundFile(); - CSelectPluginDlg dlg(pModDoc, m_nCurrentPlugin, this); + CSelectPluginDlg dlg(pModDoc, m_nCurrentPlugin, this); if (dlg.DoModal() == IDOK) { if(pSndFile->GetModSpecifications().supportsPlugins) @@ -922,7 +922,7 @@ { int cursel = m_CbnParam.GetItemData(m_CbnParam.GetCurSel()); CHAR s[256]; - + CVstPlugin *pVstPlugin = GetCurrentPlugin(); if(pVstPlugin != nullptr && cursel != CB_ERR) @@ -952,7 +952,7 @@ { VstInt32 curProg = m_CbnPreset.GetItemData(m_CbnPreset.GetCurSel()); CModDoc *pModDoc = GetDocument(); - + CVstPlugin *pVstPlugin = GetCurrentPlugin(); if(pVstPlugin != nullptr) @@ -999,7 +999,7 @@ { CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; - + if ((m_nCurrentPlugin >= MAX_MIXPLUGINS) || (!pModDoc)) return; pSndFile = pModDoc->GetSoundFile(); CVstPlugin *pVstPlugin = GetCurrentPlugin(); @@ -1026,7 +1026,7 @@ { CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; - + if ((m_nCurrentPlugin >= MAX_MIXPLUGINS) || (!pModDoc)) return; pSndFile = pModDoc->GetSoundFile(); SNDMIXPLUGIN &plugin = pSndFile->m_MixPlugins[m_nCurrentPlugin]; @@ -1051,7 +1051,7 @@ pSndFile = pModDoc->GetSoundFile(); pSndFile->m_MixPlugins[m_nCurrentPlugin].SetMasterEffect(IsDlgButtonChecked(IDC_CHECK9) != BST_UNCHECKED); - + if(pSndFile->GetModSpecifications().supportsPlugins) pModDoc->SetModified(); } @@ -1081,9 +1081,9 @@ if ((m_nCurrentPlugin >= MAX_MIXPLUGINS) || (!pModDoc)) return; pSndFile = pModDoc->GetSoundFile(); - + pSndFile->m_MixPlugins[m_nCurrentPlugin].SetExpandedMix(IsDlgButtonChecked(IDC_CHECK12) != BST_UNCHECKED); - + if(pSndFile->GetModSpecifications().supportsPlugins) pModDoc->SetModified(); } @@ -1126,7 +1126,7 @@ CModDoc *pModDoc = GetDocument(); if ((m_nCurrentPlugin >= MAX_MIXPLUGINS) || (!pModDoc)) return; pModDoc->TogglePluginEditor(m_nCurrentPlugin); - return; + return; } @@ -1209,9 +1209,12 @@ } m_nCurrentPlugin = nextPlugin; - toIndex++; - newPlugin.SetOutputPlugin(emptySlots[toIndex]); + if(dlg.DoMoveChain()) + { + toIndex++; + newPlugin.SetOutputPlugin(emptySlots[toIndex]); + } } while(dlg.DoMoveChain()); m_CbnPlugin.SetCurSel(dlg.GetSlot()); @@ -1220,7 +1223,7 @@ } -// Functor for adjusting plug indexes in modcommands. Adjusts all instrument column values in +// Functor for adjusting plug indexes in modcommands. Adjusts all instrument column values in // range [m_nInstrMin, m_nInstrMax] by m_nDiff. struct PlugIndexModifier //====================== @@ -1247,13 +1250,13 @@ CSoundFile* pSndFile = pModDoc->GetSoundFile(); BeginWaitCursor(); - + CriticalSection cs; - + // Move plug data MemCopy(pSndFile->m_MixPlugins[dest], pSndFile->m_MixPlugins[src]); MemsetZero(pSndFile->m_MixPlugins[src]); - + //Prevent plug from pointing backwards. if(!pSndFile->m_MixPlugins[dest].IsOutputToMaster()) { @@ -1263,16 +1266,16 @@ pSndFile->m_MixPlugins[dest].SetOutputToMaster(); } } - + // Update current plug if(pSndFile->m_MixPlugins[dest].pMixPlugin) { ((CVstPlugin*)pSndFile->m_MixPlugins[dest].pMixPlugin)->SetSlot(dest); ((CVstPlugin*)pSndFile->m_MixPlugins[dest].pMixPlugin)->UpdateMixStructPtr(&(pSndFile->m_MixPlugins[dest])); } - + // Update all other plugs' outputs - for (PLUGINDEX nPlug = 0; nPlug < src; nPlug++) + for (PLUGINDEX nPlug = 0; nPlug < src; nPlug++) { if(!pSndFile->m_MixPlugins[nPlug].IsOutputToMaster()) { @@ -1315,11 +1318,11 @@ } -void CViewGlobals::BuildEmptySlotList(std::vector<PLUGINDEX> &emptySlots) +void CViewGlobals::BuildEmptySlotList(std::vector<PLUGINDEX> &emptySlots) //----------------------------------------------------------------------- { const CSoundFile &sndFile = GetDocument()->GetrSoundFile(); - + emptySlots.clear(); for(PLUGINDEX nSlot = 0; nSlot < MAX_MIXPLUGINS; nSlot++) @@ -1351,7 +1354,7 @@ moveLastPlug = true; } else { - prompt.Append("\nWarning: plugin data in last slot will be lost."); + prompt.Append("\nWarning: plugin data in last slot will be lost."); } } if(Reporting::Confirm(prompt) == cnfYes) @@ -1424,9 +1427,12 @@ } m_nCurrentPlugin = curPlugin.GetOutputPlugin(); - toIndex++; - newPlugin.SetOutputPlugin(emptySlots[toIndex]); + if(dlg.DoMoveChain()) + { + toIndex++; + newPlugin.SetOutputPlugin(emptySlots[toIndex]); + } } while(dlg.DoMoveChain()); m_CbnPlugin.SetCurSel(dlg.GetSlot()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-26 09:06:26
|
Revision: 4311 http://sourceforge.net/p/modplug/code/4311 Author: manxorist Date: 2014-09-26 09:06:17 +0000 (Fri, 26 Sep 2014) Log Message: ----------- [Fix] Move #include <uxtheme.h> out of OPENMPT_NAMESPACE_BEGIN. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2014-09-24 15:16:00 UTC (rev 4310) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2014-09-26 09:06:17 UTC (rev 4311) @@ -25,7 +25,11 @@ #include "SelectPluginDialog.h" #include "../common/StringFixer.h" +// This is used for retrieving the correct background colour for the +// frames on the general tab when using WinXP Luna or Vista/Win7 Aero. +#include <uxtheme.h> + OPENMPT_NAMESPACE_BEGIN @@ -1508,8 +1512,6 @@ // This is used for retrieving the correct background colour for the // frames on the general tab when using WinXP Luna or Vista/Win7 Aero. -#include <uxtheme.h> - HBRUSH CViewGlobals::OnCtlColor(CDC *pDC, CWnd* pWnd, UINT nCtlColor) //------------------------------------------------------------------- { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-12-11 17:48:58
|
Revision: 4641 http://sourceforge.net/p/modplug/code/4641 Author: saga-games Date: 2014-12-11 17:48:49 +0000 (Thu, 11 Dec 2014) Log Message: ----------- [Fix] VS2008 doesn't have _ttof. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2014-12-07 01:53:57 UTC (rev 4640) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2014-12-11 17:48:49 UTC (rev 4641) @@ -1060,7 +1060,12 @@ GetDlgItemText(IDC_EDIT14, s, CountOf(s)); if ((m_nCurrentParam < nParams) && (s[0])) { - float fValue = (float)_ttof(s); + // VS2008 doesn't have _ttof +#ifdef UNICODE + float fValue = (float)_wtof(s); +#else + float fValue = (float)atof(s); +#endif pVstPlugin->SetParameter(m_nCurrentParam, fValue); OnParamChanged(); SetPluginModified(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-12-12 10:52:06
|
Revision: 4644 http://sourceforge.net/p/modplug/code/4644 Author: manxorist Date: 2014-12-12 10:51:53 +0000 (Fri, 12 Dec 2014) Log Message: ----------- [Ref] VS2008 does not provide _ttof. However, it does provide _tstof which does exactly the same thing. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_gen.cpp Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2014-12-11 22:47:28 UTC (rev 4643) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2014-12-12 10:51:53 UTC (rev 4644) @@ -1060,12 +1060,7 @@ GetDlgItemText(IDC_EDIT14, s, CountOf(s)); if ((m_nCurrentParam < nParams) && (s[0])) { - // VS2008 doesn't have _ttof -#ifdef UNICODE - float fValue = (float)_wtof(s); -#else - float fValue = (float)atof(s); -#endif + float fValue = (float)_tstof(s); pVstPlugin->SetParameter(m_nCurrentParam, fValue); OnParamChanged(); SetPluginModified(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |