mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 03:52:01 +00:00
Gather Null specific platform selection logic
The more specific error description is now used whatever the desired platform is, when a binary only supports the Null platform.
This commit is contained in:
parent
b3a98f8555
commit
706d1f1653
@ -72,6 +72,11 @@ GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform)
|
|||||||
// Only allow the Null platform if specifically requested
|
// Only allow the Null platform if specifically requested
|
||||||
if (desiredID == GLFW_PLATFORM_NULL)
|
if (desiredID == GLFW_PLATFORM_NULL)
|
||||||
return _glfwConnectNull(desiredID, platform);
|
return _glfwConnectNull(desiredID, platform);
|
||||||
|
else if (count == 0)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "This binary only supports the Null platform");
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (desiredID == GLFW_ANY_PLATFORM)
|
if (desiredID == GLFW_ANY_PLATFORM)
|
||||||
{
|
{
|
||||||
@ -86,10 +91,7 @@ GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform)
|
|||||||
return GLFW_TRUE;
|
return GLFW_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count)
|
|
||||||
_glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "Failed to detect any supported platform");
|
_glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "Failed to detect any supported platform");
|
||||||
else
|
|
||||||
_glfwInputError(GLFW_PLATFORM_UNAVAILABLE, "This binary only supports the Null platform");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user