Allow more than 64 columns in Dear ImGUI (patched)

Improves Channel window displays, with System info.
This commit is contained in:
cam900 2022-05-27 13:38:45 +09:00
parent 905aa1b1a1
commit 67a7f39d9a
4 changed files with 135 additions and 59 deletions

View file

@ -696,7 +696,7 @@ void DivEngine::initSongWithDesc(const int* description) {
song.systemFlags[index]=description[i+3];
index++;
chanCount+=getChannelCount(song.system[index]);
if (chanCount>=63) break;
if (chanCount>=DIV_MAX_CHANS) break;
if (index>=32) break;
}
song.systemLen=index;
@ -886,9 +886,8 @@ bool DivEngine::addSystem(DivSystem which) {
lastError="max number of systems is 32";
return false;
}
// this was DIV_MAX_CHANS but I am setting it to 63 for now due to an ImGui limitation
if (chans+getChannelCount(which)>63) {
lastError="max number of total channels is 63";
if (chans+getChannelCount(which)>DIV_MAX_CHANS) {
lastError=fmt::sprintf("max number of total channels is %d",DIV_MAX_CHANS);
return false;
}
quitDispatch();