[client] egl: clamp downscale factor range

This commit is contained in:
Quantum 2021-08-14 00:56:19 -04:00 committed by Geoffrey McRae
parent 5b2fce0830
commit bbd173000f

View file

@ -219,8 +219,10 @@ static bool egl_filterDownscaleImguiConfig(EGL_Filter * filter)
float pixelSize = this->pixelSize; float pixelSize = this->pixelSize;
igInputFloat("Pixel size", &pixelSize, 0.1f, 1.0f, "%.2f", ImGuiInputTextFlags_CharsDecimal); igInputFloat("Pixel size", &pixelSize, 0.1f, 1.0f, "%.2f", ImGuiInputTextFlags_CharsDecimal);
pixelSize = util_clamp(pixelSize, 1.0f, 10.0f);
igSliderFloat("##pixelsize", &pixelSize, 1.0f, 10.0f, "%.2f", igSliderFloat("##pixelsize", &pixelSize, 1.0f, 10.0f, "%.2f",
ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoInput); ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoInput);
igText("Resolution: %dx%d", this->width, this->height); igText("Resolution: %dx%d", this->width, this->height);
if (pixelSize != this->pixelSize) if (pixelSize != this->pixelSize)