Lines Matching refs:desired
219 // Chooses the video mode most closely matching the desired one
222 const GLFWvidmode* desired)
240 if (desired->redBits != GLFW_DONT_CARE)
241 colorDiff += abs(current->redBits - desired->redBits);
242 if (desired->greenBits != GLFW_DONT_CARE)
243 colorDiff += abs(current->greenBits - desired->greenBits);
244 if (desired->blueBits != GLFW_DONT_CARE)
245 colorDiff += abs(current->blueBits - desired->blueBits);
247 sizeDiff = abs((current->width - desired->width) *
248 (current->width - desired->width) +
249 (current->height - desired->height) *
250 (current->height - desired->height));
252 if (desired->refreshRate != GLFW_DONT_CARE)
253 rateDiff = abs(current->refreshRate - desired->refreshRate);