From: <sag...@us...> - 2013-03-17 02:14:33
|
Revision: 1584 http://sourceforge.net/p/modplug/code/1584 Author: saga-games Date: 2013-03-17 02:14:22 +0000 (Sun, 17 Mar 2013) Log Message: ----------- [Fix] Play Whole Row While Recording didn't work properly with Row Spacing values other than 0 (tx coda). [Mod] Play Whole Row While Recording is now also applied to Quick Paste and Clear+Step commands (tx coda). [Mod] OpenMPT: Version is now 1.21.01.21 Modified Paths: -------------- trunk/OpenMPT/common/version.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h Modified: trunk/OpenMPT/common/version.h =================================================================== --- trunk/OpenMPT/common/version.h 2013-03-16 23:32:19 UTC (rev 1583) +++ trunk/OpenMPT/common/version.h 2013-03-17 02:14:22 UTC (rev 1584) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 21 #define VER_MINOR 01 -#define VER_MINORMINOR 20 +#define VER_MINORMINOR 21 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2013-03-16 23:32:19 UTC (rev 1583) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2013-03-17 02:14:22 UTC (rev 1584) @@ -2435,12 +2435,12 @@ void CViewPattern::OnPatternStep() //-------------------------------- { - PatternStep(true); + PatternStep(); } -void CViewPattern::PatternStep(bool autoStep) -//------------------------------------------- +void CViewPattern::PatternStep(ROWINDEX row) +//------------------------------------------ { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); CModDoc *pModDoc = GetDocument(); @@ -2459,7 +2459,7 @@ pSndFile->Chn[i].dwFlags.set(CHN_NOTEFADE | CHN_KEYOFF); } pSndFile->LoopPattern(m_nPattern); - pSndFile->m_nNextRow = GetCurrentRow(); + pSndFile->m_nNextRow = row == ROWINDEX_INVALID ? GetCurrentRow() : row; pSndFile->m_SongFlags.reset(SONG_PAUSED); pSndFile->m_SongFlags.set(SONG_STEP); @@ -2470,7 +2470,7 @@ pMainFrm->PlayMod(pModDoc, m_hWnd, MPTNOTIFY_POSITION|MPTNOTIFY_VUMETERS); } CMainFrame::EnableLowLatencyMode(); - if(autoStep) + if(row == ROWINDEX_INVALID) { if (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_CONTSCROLL) SetCurrentRow(GetCurrentRow() + 1, TRUE); @@ -2552,6 +2552,11 @@ } SetModified(false); + // Preview Row + if((TrackerSettings::Instance().m_dwPatternSetup & PATTERN_PLAYEDITROW) && !IsLiveRecord()) + { + PatternStep(GetCurrentRow()); + } if(GetSoundFile()->IsPaused() || !m_Status[psFollowSong] || (CMainFrame::GetMainFrame() && CMainFrame::GetMainFrame()->GetFollowSong(GetDocument()) != m_hWnd)) { @@ -5111,7 +5116,7 @@ if (playWholeRow) { // play the whole row in "step mode" - PatternStep(false); + PatternStep(nRow); } if (!playWholeRow || !recordEnabled) { @@ -5346,7 +5351,7 @@ if(playWholeRow) { // play the whole row in "step mode" - PatternStep(false); + PatternStep(GetCurrentRow()); } if(!playWholeRow || !recordEnabled) { @@ -5684,6 +5689,12 @@ if(step && (pSndFile->IsPaused() || !m_Status[psFollowSong] || (CMainFrame::GetMainFrame() != nullptr && CMainFrame::GetMainFrame()->GetFollowSong(GetDocument()) != m_hWnd))) { + // Preview Row + if((TrackerSettings::Instance().m_dwPatternSetup & PATTERN_PLAYEDITROW) && !IsLiveRecord()) + { + PatternStep(GetCurrentRow()); + } + if ((m_nSpacing > 0) && (m_nSpacing <= MAX_SPACING)) SetCurrentRow(GetCurrentRow() + m_nSpacing); Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2013-03-16 23:32:19 UTC (rev 1583) +++ trunk/OpenMPT/mptrack/View_pat.h 2013-03-17 02:14:22 UTC (rev 1584) @@ -505,7 +505,7 @@ bool IsEditingEnabled_bmsg(); // Play one pattern row and stop ("step mode") - void PatternStep(bool autoStep); + void PatternStep(ROWINDEX row = ROWINDEX_INVALID); // Add a channel. void AddChannelBefore(CHANNELINDEX nBefore); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |