mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Update context.c
This commit is contained in:
parent
2c28530875
commit
cac3fd18a0
@ -321,14 +321,19 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
|
|||||||
// Least number of missing buffers is the most important heuristic,
|
// Least number of missing buffers is the most important heuristic,
|
||||||
// then color buffer size match and lastly size match for other buffers
|
// then color buffer size match and lastly size match for other buffers
|
||||||
|
|
||||||
if ((accelerationMatch && !closestAccelerationMatch) || missing < leastMissing)
|
if (accelerationMatch && !closestAccelerationMatch)
|
||||||
closest = current;
|
closest = current;
|
||||||
else if (missing == leastMissing)
|
else if (accelerationMatch == closestAccelerationMatch)
|
||||||
{
|
{
|
||||||
if ((colorDiff < leastColorDiff) ||
|
if (missing < leastMissing)
|
||||||
(colorDiff == leastColorDiff && extraDiff < leastExtraDiff))
|
|
||||||
{
|
|
||||||
closest = current;
|
closest = current;
|
||||||
|
else if (missing == leastMissing)
|
||||||
|
{
|
||||||
|
if ((colorDiff < leastColorDiff) ||
|
||||||
|
(colorDiff == leastColorDiff && extraDiff < leastExtraDiff))
|
||||||
|
{
|
||||||
|
closest = current;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user