Don't let sample offest of length go negative (crashes RageAudio and doesn't make sense anyway)
This commit is contained in:
@@ -934,6 +934,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pSong->m_fMusicSampleStartSeconds += fOffsetDelta;
|
m_pSong->m_fMusicSampleStartSeconds += fOffsetDelta;
|
||||||
|
m_pSong->m_fMusicSampleStartSeconds = max(m_pSong->m_fMusicSampleStartSeconds,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIK_SUBTRACT:
|
case DIK_SUBTRACT:
|
||||||
@@ -953,6 +954,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pSong->m_fMusicSampleLengthSeconds += fDelta;
|
m_pSong->m_fMusicSampleLengthSeconds += fDelta;
|
||||||
|
m_pSong->m_fMusicSampleLengthSeconds = max(m_pSong->m_fMusicSampleLengthSeconds,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user