From: <sag...@us...> - 2009-07-08 22:24:01
|
Revision: 288 http://modplug.svn.sourceforge.net/modplug/?rev=288&view=rev Author: saga-games Date: 2009-07-08 22:23:42 +0000 (Wed, 08 Jul 2009) Log Message: ----------- [Fix] Patterns: Reset pattern name when deleting pattern [Fix] Sample drawing: Disable sample drawing button when the sample is actually empty [Fix] DC offset removal: Selection detection was buggy Modified Paths: -------------- trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.cpp Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-08 18:38:38 UTC (rev 287) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2009-07-08 22:23:42 UTC (rev 288) @@ -1441,6 +1441,7 @@ BEGIN_CRITICAL(); LPVOID p = m_SndFile.Patterns[n]; m_SndFile.Patterns[n] = NULL; + m_SndFile.SetPatternName(n, ""); CSoundFile::FreePattern(p); END_CRITICAL(); SetModified(); Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-08 18:38:38 UTC (rev 287) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2009-07-08 22:23:42 UTC (rev 288) @@ -1087,7 +1087,7 @@ { case ID_SAMPLE_DRAW: if(m_bDrawingEnabled) dwStyle |= NCBTNS_CHECKED; - if(pSndFile->Ins[m_nSample].GetNumChannels() > 1) dwStyle |= NCBTNS_DISABLED; + if(pSndFile->Ins[m_nSample].GetNumChannels() > 1 || pSndFile->Ins[m_nSample].pSample == nullptr) dwStyle |= NCBTNS_DISABLED; break; } Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-08 18:38:38 UTC (rev 287) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2009-07-08 22:23:42 UTC (rev 288) @@ -280,7 +280,7 @@ RemoveOffsetAndNormalize( reinterpret_cast<int8*>(pins->pSample) + iStart, iEnd - iStart, dOffset, dAmplify); // step 3: adjust global vol (if available) - if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd = pins->nLength)) + if((modtype & (MOD_TYPE_IT | MOD_TYPE_MPT)) && (iStart == 0) && (iEnd == pins->nLength)) pins->nGlobalVol = min((WORD)(pins->nGlobalVol / dAmplify), 64); AdjustEndOfSample(smp, pSndFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |