GUI: implement chan osc volume label
This commit is contained in:
parent
e1cf040b33
commit
83219cefc7
|
@ -506,12 +506,26 @@ void FurnaceGUI::drawChanOsc() {
|
||||||
text+=fmt::sprintf("%d",e->dispatchOfChan[ch]);
|
text+=fmt::sprintf("%d",e->dispatchOfChan[ch]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'v':
|
case 'v': {
|
||||||
|
DivChannelState* chanState=e->getChanState(ch);
|
||||||
|
if (chanState==NULL) break;
|
||||||
|
text+=fmt::sprintf("%d",chanState->volume>>8);
|
||||||
break;
|
break;
|
||||||
case 'V':
|
}
|
||||||
|
case 'V': {
|
||||||
|
DivChannelState* chanState=e->getChanState(ch);
|
||||||
|
if (chanState==NULL) break;
|
||||||
|
int volMax=chanState->volMax>>8;
|
||||||
|
if (volMax<1) volMax=1;
|
||||||
|
text+=fmt::sprintf("%d%%",(chanState->volume>>8)/volMax);
|
||||||
break;
|
break;
|
||||||
case 'b':
|
}
|
||||||
|
case 'b': {
|
||||||
|
DivChannelState* chanState=e->getChanState(ch);
|
||||||
|
if (chanState==NULL) break;
|
||||||
|
text+=fmt::sprintf("%.2X",chanState->volume>>8);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case '%':
|
case '%':
|
||||||
text+='%';
|
text+='%';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue