Removed window size DWIM.

This commit is contained in:
Camilla Berglund
2012-11-22 17:04:54 +01:00
parent 14355d692f
commit b8c16e49f1
12 changed files with 20 additions and 33 deletions
+4 -15
View File
@@ -263,22 +263,11 @@ GLFWAPI GLFWwindow glfwCreateWindow(int width, int height,
return GL_FALSE;
}
// Check width & height
if (width > 0 && height <= 0)
if (width <= 0 || height <= 0)
{
// Set the window aspect ratio to 4:3
height = (width * 3) / 4;
}
else if (width <= 0 && height > 0)
{
// Set the window aspect ratio to 4:3
width = (height * 4) / 3;
}
else if (width <= 0 && height <= 0)
{
// Default window size
width = 640;
height = 480;
_glfwSetError(GLFW_INVALID_VALUE,
"glfwCreateWindow: Invalid window size");
return GL_FALSE;
}
window = (_GLFWwindow*) calloc(1, sizeof(_GLFWwindow));