Removed allocator.

This commit is contained in:
Camilla Berglund
2012-02-07 14:58:58 +01:00
parent 086fba40b4
commit 0c3b1b5a0e
32 changed files with 47 additions and 105 deletions
+6 -6
View File
@@ -339,7 +339,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
return 0;
}
rgbarray = (int*) _glfwMalloc(sizeof(int) * viscount);
rgbarray = (int*) malloc(sizeof(int) * viscount);
rgbcount = 0;
// Build RGB array
@@ -387,7 +387,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, _glfwLibrary.X11.root);
sizelist = XRRConfigSizes(sc, &sizecount);
resarray = (struct _glfwResolution*) _glfwMalloc(sizeof(struct _glfwResolution) * sizecount);
resarray = (struct _glfwResolution*) malloc(sizeof(struct _glfwResolution) * sizecount);
for (k = 0; k < sizecount; k++)
{
@@ -407,7 +407,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
XF86VidModeGetAllModeLines(_glfwLibrary.X11.display, screen, &modecount, &modelist);
resarray = (struct _glfwResolution*) _glfwMalloc(sizeof(struct _glfwResolution) * modecount);
resarray = (struct _glfwResolution*) malloc(sizeof(struct _glfwResolution) * modecount);
for (k = 0; k < modecount; k++)
{
@@ -436,7 +436,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
if (!resarray)
{
rescount = 1;
resarray = (struct _glfwResolution*) _glfwMalloc(sizeof(struct _glfwResolution) * rescount);
resarray = (struct _glfwResolution*) malloc(sizeof(struct _glfwResolution) * rescount);
resarray[0].width = DisplayWidth(_glfwLibrary.X11.display, screen);
resarray[0].height = DisplayHeight(_glfwLibrary.X11.display, screen);
@@ -459,8 +459,8 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
XFree(vislist);
_glfwFree(resarray);
_glfwFree(rgbarray);
free(resarray);
free(rgbarray);
return count;
}