GUI: code style

This commit is contained in:
tildearrow 2024-02-07 18:29:08 -05:00
parent 20b4b7c185
commit 688be931d0
2 changed files with 32 additions and 38 deletions

View file

@ -208,44 +208,38 @@ void FurnaceGUI::drawPalette() {
if (paletteSearchResults.size()>0) { if (paletteSearchResults.size()>0) {
int i=paletteSearchResults[curPaletteChoice]; int i=paletteSearchResults[curPaletteChoice];
switch (curPaletteType) { switch (curPaletteType) {
case CMDPAL_TYPE_MAIN: case CMDPAL_TYPE_MAIN:
doAction(i); doAction(i);
break; break;
case CMDPAL_TYPE_RECENT:
case CMDPAL_TYPE_RECENT: openRecentFile(recentFile[i]);
openRecentFile(recentFile[i]); break;
break; case CMDPAL_TYPE_INSTRUMENTS:
curIns=i-1;
case CMDPAL_TYPE_INSTRUMENTS: break;
curIns=i-1; case CMDPAL_TYPE_SAMPLES:
break; curSample=i;
break;
case CMDPAL_TYPE_SAMPLES: case CMDPAL_TYPE_INSTRUMENT_CHANGE:
curSample=i; doChangeIns(i-1);
break; break;
case CMDPAL_TYPE_ADD_CHIP:
case CMDPAL_TYPE_INSTRUMENT_CHANGE: if (i!=DIV_SYSTEM_NULL) {
doChangeIns(i-1); if (!e->addSystem((DivSystem)i)) {
break; showError("cannot add chip! ("+e->getLastError()+")");
} else {
case CMDPAL_TYPE_ADD_CHIP: MARK_MODIFIED;
if (i!=DIV_SYSTEM_NULL) { }
if (!e->addSystem((DivSystem)i)) { ImGui::CloseCurrentPopup();
showError("cannot add chip! ("+e->getLastError()+")"); if (e->song.autoSystem) {
} else { autoDetectSystem();
MARK_MODIFIED; }
updateWindowTitle();
} }
ImGui::CloseCurrentPopup(); break;
if (e->song.autoSystem) { default:
autoDetectSystem(); logE("invalid command palette type");
} break;
updateWindowTitle();
}
break;
default:
logE("invalid command palette type");
break;
}; };
} }
ImGui::CloseCurrentPopup(); ImGui::CloseCurrentPopup();

View file

@ -7898,7 +7898,7 @@ FurnaceGUI::FurnaceGUI():
memset(macroRelLabel,0,32); memset(macroRelLabel,0,32);
memset(emptyLabel,0,32); memset(emptyLabel,0,32);
memset(emptyLabel2,0,32); memset(emptyLabel2,0,32);
//effect sorting // effect sorting
memset(effectsShow,1,sizeof(bool)*10); memset(effectsShow,1,sizeof(bool)*10);
strncpy(noteOffLabel,"OFF",32); strncpy(noteOffLabel,"OFF",32);