GUI: add setting to see mem usage in bytes

This commit is contained in:
tildearrow 2023-06-30 22:44:08 -05:00
parent a69b02f525
commit e5a5bb0154
3 changed files with 21 additions and 1 deletions

View file

@ -41,7 +41,12 @@ void FurnaceGUI::drawStats() {
for (int j=0; dispatch!=NULL && dispatch->getSampleMemCapacity(j)>0; j++) {
size_t capacity=dispatch->getSampleMemCapacity(j);
size_t usage=dispatch->getSampleMemUsage(j);
String usageStr=fmt::sprintf("%d/%dKB",usage/1024,capacity/1024);
String usageStr;
if (settings.memUsageUnit==1) {
usageStr=fmt::sprintf("%d/%dKB",usage/1024,capacity/1024);
} else {
usageStr=fmt::sprintf("%d/%d",usage,capacity);
}
ImGui::Text("%s [%d]", e->getSystemName(e->song.system[i]), j);
ImGui::SameLine();
ImGui::ProgressBar(((float)usage)/((float)capacity),ImVec2(-FLT_MIN,0),usageStr.c_str());