mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 14:21:57 +00:00
[client] egl: clamp downscale factor range
This commit is contained in:
parent
5b2fce0830
commit
bbd173000f
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue