From 1430749ea6af47fd64bb2aad7010d0fd99562889 Mon Sep 17 00:00:00 2001 From: Paddyk45 <73178245+Paddyk45@users.noreply.github.com> Date: Fri, 11 Apr 2025 22:20:44 +0200 Subject: [PATCH] use double instead of int and multiply by 100 --- src/gui/chanOsc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/chanOsc.cpp b/src/gui/chanOsc.cpp index a16517bf0..84e0ebd38 100644 --- a/src/gui/chanOsc.cpp +++ b/src/gui/chanOsc.cpp @@ -887,9 +887,9 @@ void FurnaceGUI::drawChanOsc() { case 'V': { DivChannelState* chanState=e->getChanState(ch); if (chanState==NULL) break; - int volMax=chanState->volMax>>8; + double volMax=chanState->volMax>>8; if (volMax<1) volMax=1; - text+=fmt::sprintf("%d%%",(chanState->volume>>8)/volMax); + text+=fmt::sprintf("%.1f%%",((double)(chanState->volume>>8)/volMax)*100); break; } case 'b': {