MainWindow: skip autosave while playing or exporting
It's a very bad idea to autosave while playing as this causes severe underrun problems. Therefore instead of autosaving, trigger a re-try timer for 10 seconds. Closes #3317776.
This commit is contained in:
@@ -1047,8 +1047,17 @@ void MainWindow::browseHelp( void )
|
||||
|
||||
void MainWindow::autoSave()
|
||||
{
|
||||
QDir work(configManager::inst()->workingDir());
|
||||
engine::getSong()->saveProjectFile(work.absoluteFilePath("recover.mmp"));
|
||||
if( !( engine::getSong()->isPlaying() ||
|
||||
engine::getSong()->isExporting() ) )
|
||||
{
|
||||
QDir work(configManager::inst()->workingDir());
|
||||
engine::getSong()->saveProjectFile(work.absoluteFilePath("recover.mmp"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// try again in 10 seconds
|
||||
QTimer::singleShot( 10*1000, this, SLOT( autoSave() ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user