We have a usable fminf now.
master
Camilla Löwy ago%!(EXTRA string=7 years)
parent a533c9b3ca
commit 3201eedc34
  1. 4
      src/monitor.c

@ -450,10 +450,8 @@ GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma)
value = i / 255.f; value = i / 255.f;
// Apply gamma curve // Apply gamma curve
value = powf(value, 1.f / gamma) * 65535.f + 0.5f; value = powf(value, 1.f / gamma) * 65535.f + 0.5f;
// Clamp to value range // Clamp to value range
if (value > 65535.f) value = _glfw_fminf(value, 65535.f);
value = 65535.f;
values[i] = (unsigned short) value; values[i] = (unsigned short) value;
} }

Loading…
Cancel
Save