Adjust the preload value to account for 4-byte floats
This commit is contained in:
parent
0e7ba04c8c
commit
935b07603e
1 changed files with 2 additions and 2 deletions
|
|
@ -565,14 +565,14 @@ void Editor::Impl::createFrameContents()
|
|||
for (int log2value = 10; log2value <= 16; ++log2value) {
|
||||
int value = 1 << log2value;
|
||||
char text[256];
|
||||
sprintf(text, "%d kB", value / 1024);
|
||||
sprintf(text, "%d kB", value / 1024 * 4);
|
||||
text[sizeof(text) - 1] = '\0';
|
||||
preloadSizeSlider_->addEntry(text, value);
|
||||
}
|
||||
preloadSizeSlider_->setValueToStringFunction2(
|
||||
[](float value, std::string& result, CParamDisplay*) -> bool
|
||||
{
|
||||
result = std::to_string(static_cast<int>(std::round(value * (1.0 / 1024)))) + " kB";
|
||||
result = std::to_string(static_cast<int>(std::round(value * (1.0 / 1024 * 4)))) + " kB";
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue