GUI: add "don't display multi-system" option
This commit is contained in:
parent
030ba9eaf1
commit
9915fc0c8f
7 changed files with 61 additions and 9 deletions
|
|
@ -548,7 +548,7 @@ class DivEngine {
|
|||
DivInstrumentType getPreferInsSecondType(int ch);
|
||||
|
||||
// get song system name
|
||||
const char* getSongSystemName();
|
||||
String getSongSystemName(bool isMultiSystemAcceptable=true);
|
||||
|
||||
// get sys name
|
||||
const char* getSystemName(DivSystem sys);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ std::vector<DivInstrumentType>& DivEngine::getPossibleInsTypes() {
|
|||
}
|
||||
|
||||
// TODO: rewrite this function (again). it's an unreliable mess.
|
||||
const char* DivEngine::getSongSystemName() {
|
||||
String DivEngine::getSongSystemName(bool isMultiSystemAcceptable) {
|
||||
switch (song.systemLen) {
|
||||
case 0:
|
||||
return "help! what's going on!";
|
||||
|
|
@ -198,7 +198,15 @@ const char* DivEngine::getSongSystemName() {
|
|||
}
|
||||
break;
|
||||
}
|
||||
return "multi-system";
|
||||
if (isMultiSystemAcceptable) return "multi-system";
|
||||
|
||||
String ret="";
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
if (i>0) ret+=" + ";
|
||||
ret+=getSystemName(song.system[i]);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char* DivEngine::getSystemName(DivSystem sys) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue