mirror of https://github.com/aap/librw.git
fixed allocation
This commit is contained in:
parent
6ff378bb16
commit
8b07204abb
|
@ -1236,7 +1236,7 @@ makeVideoModeList(void)
|
||||||
|
|
||||||
modes = glfwGetVideoModes(glGlobals.monitor, &num);
|
modes = glfwGetVideoModes(glGlobals.monitor, &num);
|
||||||
rwFree(glGlobals.modes);
|
rwFree(glGlobals.modes);
|
||||||
glGlobals.modes = rwNewT(DisplayMode, num, ID_DRIVER | MEMDUR_EVENT);
|
glGlobals.modes = rwNewT(DisplayMode, num+1, ID_DRIVER | MEMDUR_EVENT);
|
||||||
|
|
||||||
glGlobals.modes[0].mode = *glfwGetVideoMode(glGlobals.monitor);
|
glGlobals.modes[0].mode = *glfwGetVideoMode(glGlobals.monitor);
|
||||||
glGlobals.modes[0].flags = 0;
|
glGlobals.modes[0].flags = 0;
|
||||||
|
|
Loading…
Reference in New Issue