mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
Moved function into correct category.
This commit is contained in:
parent
a910f53be2
commit
cb02a693b4
@ -94,43 +94,9 @@ static int refreshVideoModes(_GLFWmonitor* monitor)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
////// GLFW event API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
_GLFWmonitor* _glfwCreateMonitor(const char* name,
|
||||
GLboolean primary,
|
||||
int widthMM, int heightMM,
|
||||
int x, int y)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
|
||||
if (!monitor)
|
||||
{
|
||||
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
monitor->name = strdup(name);
|
||||
monitor->primary = primary;
|
||||
monitor->widthMM = widthMM;
|
||||
monitor->heightMM = heightMM;
|
||||
monitor->positionX = x;
|
||||
monitor->positionY = y;
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
||||
void _glfwDestroyMonitor(_GLFWmonitor* monitor)
|
||||
{
|
||||
if (monitor == NULL)
|
||||
return;
|
||||
|
||||
_glfwPlatformDestroyMonitor(monitor);
|
||||
|
||||
free(monitor->modes);
|
||||
free(monitor->name);
|
||||
free(monitor);
|
||||
}
|
||||
|
||||
void _glfwInputMonitorChange(void)
|
||||
{
|
||||
int i, j, monitorCount;
|
||||
@ -189,6 +155,45 @@ void _glfwInputMonitorChange(void)
|
||||
_glfw.monitorCount = monitorCount;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
_GLFWmonitor* _glfwCreateMonitor(const char* name,
|
||||
GLboolean primary,
|
||||
int widthMM, int heightMM,
|
||||
int x, int y)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
|
||||
if (!monitor)
|
||||
{
|
||||
_glfwInputError(GLFW_OUT_OF_MEMORY, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
monitor->name = strdup(name);
|
||||
monitor->primary = primary;
|
||||
monitor->widthMM = widthMM;
|
||||
monitor->heightMM = heightMM;
|
||||
monitor->positionX = x;
|
||||
monitor->positionY = y;
|
||||
|
||||
return monitor;
|
||||
}
|
||||
|
||||
void _glfwDestroyMonitor(_GLFWmonitor* monitor)
|
||||
{
|
||||
if (monitor == NULL)
|
||||
return;
|
||||
|
||||
_glfwPlatformDestroyMonitor(monitor);
|
||||
|
||||
free(monitor->modes);
|
||||
free(monitor->name);
|
||||
free(monitor);
|
||||
}
|
||||
|
||||
void _glfwDestroyMonitors(void)
|
||||
{
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user