fix oscref_channel not taking into account hidden channels
i love when children annoy me then i get ignored for the rest of the day
This commit is contained in:
parent
c681ac507e
commit
b5fc6ff39d
2 changed files with 5 additions and 5 deletions
|
|
@ -56,7 +56,7 @@ static void _drawOsc(const ImDrawList* drawList, const ImDrawCmd* cmd) {
|
|||
}
|
||||
}
|
||||
|
||||
float FurnaceGUI::computeGradPos(int type, int chan) {
|
||||
float FurnaceGUI::computeGradPos(int type, int chan, int totalChans) {
|
||||
switch (type) {
|
||||
case GUI_OSCREF_NONE:
|
||||
return 0.0f;
|
||||
|
|
@ -74,7 +74,7 @@ float FurnaceGUI::computeGradPos(int type, int chan) {
|
|||
return chanOscVol[chan];
|
||||
break;
|
||||
case GUI_OSCREF_CHANNEL:
|
||||
return (float)chan/(float)(e->getTotalChannelCount()-1);
|
||||
return (float)chan/(float)(totalChans-1);
|
||||
break;
|
||||
case GUI_OSCREF_BRIGHT:
|
||||
return chanOscBright[chan];
|
||||
|
|
@ -798,8 +798,8 @@ void FurnaceGUI::drawChanOsc() {
|
|||
}
|
||||
ImU32 color=ImGui::GetColorU32(chanOscUseChanColor?channelColor(oscChans[i]):chanOscColor);
|
||||
if (chanOscUseGrad) {
|
||||
float xVal=computeGradPos(chanOscColorX,ch);
|
||||
float yVal=computeGradPos(chanOscColorY,ch);
|
||||
float xVal=computeGradPos(chanOscColorX,ch,oscBufs.size());
|
||||
float yVal=computeGradPos(chanOscColorY,ch,oscBufs.size());
|
||||
|
||||
xVal=CLAMP(xVal,0.0f,1.0f);
|
||||
yVal=CLAMP(yVal,0.0f,1.0f);
|
||||
|
|
|
|||
|
|
@ -3102,7 +3102,7 @@ class FurnaceGUI {
|
|||
bool importConfig(String path);
|
||||
bool exportConfig(String path);
|
||||
|
||||
float computeGradPos(int type, int chan);
|
||||
float computeGradPos(int type, int chan, int totalChans);
|
||||
|
||||
void resetColors();
|
||||
void resetKeybinds();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue