mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 17:45:10 +00:00
GUI: fix OPLL/OPL op swapping
This commit is contained in:
parent
480243b652
commit
aa38292ca4
1 changed files with 8 additions and 6 deletions
|
@ -1579,15 +1579,17 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros) {
|
||||||
if (dragItem!=NULL) { \
|
if (dragItem!=NULL) { \
|
||||||
if (dragItem->IsDataType("FUR_OP")) { \
|
if (dragItem->IsDataType("FUR_OP")) { \
|
||||||
if (opToMove!=i && opToMove>=0) { \
|
if (opToMove!=i && opToMove>=0) { \
|
||||||
|
int destOp=(opCount==4 && ins->type!=DIV_INS_OPL_DRUMS)?opOrder[i]:i; \
|
||||||
|
int sourceOp=(opCount==4 && ins->type!=DIV_INS_OPL_DRUMS)?opOrder[opToMove]:opToMove; \
|
||||||
if (ImGui::IsKeyDown(ImGuiKey_LeftShift) || ImGui::IsKeyDown(ImGuiKey_RightShift)) { \
|
if (ImGui::IsKeyDown(ImGuiKey_LeftShift) || ImGui::IsKeyDown(ImGuiKey_RightShift)) { \
|
||||||
e->lockEngine([this,ins,i]() { \
|
e->lockEngine([ins,destOp,sourceOp]() { \
|
||||||
ins->fm.op[orderedOps[i]]=ins->fm.op[orderedOps[opToMove]]; \
|
ins->fm.op[destOp]=ins->fm.op[sourceOp]; \
|
||||||
}); \
|
}); \
|
||||||
} else { \
|
} else { \
|
||||||
e->lockEngine([this,ins,i]() { \
|
e->lockEngine([ins,destOp,sourceOp]() { \
|
||||||
DivInstrumentFM::Operator origOp=ins->fm.op[orderedOps[opToMove]]; \
|
DivInstrumentFM::Operator origOp=ins->fm.op[sourceOp]; \
|
||||||
ins->fm.op[orderedOps[opToMove]]=ins->fm.op[orderedOps[i]]; \
|
ins->fm.op[sourceOp]=ins->fm.op[destOp]; \
|
||||||
ins->fm.op[orderedOps[i]]=origOp; \
|
ins->fm.op[destOp]=origOp; \
|
||||||
}); \
|
}); \
|
||||||
} \
|
} \
|
||||||
PARAMETER; \
|
PARAMETER; \
|
||||||
|
|
Loading…
Reference in a new issue