dev103 - store system name and other info in song

This commit is contained in:
tildearrow 2022-07-23 17:02:03 -05:00
parent d004629a58
commit 8d88ac766c
12 changed files with 146 additions and 69 deletions

View file

@ -842,7 +842,7 @@ void DivEngine::initSongWithDesc(const int* description) {
}
}
void DivEngine::createNew(const int* description) {
void DivEngine::createNew(const int* description, String sysName) {
quitDispatch();
BUSY_BEGIN;
saveLock.lock();
@ -852,6 +852,11 @@ void DivEngine::createNew(const int* description) {
if (description!=NULL) {
initSongWithDesc(description);
}
if (sysName=="") {
song.systemName=getSongSystemLegacyName(song,getConfInt("noMultiSystem",0));
} else {
song.systemName=sysName;
}
recalcChans();
saveLock.unlock();
BUSY_END;
@ -3197,6 +3202,12 @@ bool DivEngine::init() {
preset.push_back(0);
initSongWithDesc(preset.data());
}
String sysName=getConfString("initialSysName","");
if (sysName=="") {
song.systemName=getSongSystemLegacyName(song,getConfInt("noMultiSystem",0));
} else {
song.systemName=sysName;
}
hasLoadedSomething=true;
}