Update context.c

This commit is contained in:
SuperSodaSea 2024-02-20 23:14:21 +08:00
parent 2c28530875
commit cac3fd18a0
No known key found for this signature in database
GPG Key ID: E61427FBB745EA7D

View File

@ -321,7 +321,11 @@ 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;
else if (accelerationMatch == closestAccelerationMatch)
{
if (missing < leastMissing)
closest = current; closest = current;
else if (missing == leastMissing) else if (missing == leastMissing)
{ {
@ -331,6 +335,7 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
closest = current; closest = current;
} }
} }
}
if (current == closest) if (current == closest)
{ {