Removed platform-specific resources from monitor.

This commit is contained in:
Camilla Berglund 2013-02-20 15:44:37 +01:00
parent 719b60dd2b
commit a591cdeba6
6 changed files with 3 additions and 21 deletions

View File

@ -258,10 +258,6 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
return monitors; return monitors;
} }
void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor)
{
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{ {
CFArrayRef modes; CFArrayRef modes;

View File

@ -363,10 +363,6 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode);
*/ */
_GLFWmonitor** _glfwPlatformGetMonitors(int* count); _GLFWmonitor** _glfwPlatformGetMonitors(int* count);
/*! @ingroup platform
*/
void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor);
/*! @copydoc glfwGetVideoModes /*! @copydoc glfwGetVideoModes
* @ingroup platform * @ingroup platform
*/ */

View File

@ -180,8 +180,6 @@ void _glfwDestroyMonitor(_GLFWmonitor* monitor)
if (monitor == NULL) if (monitor == NULL)
return; return;
_glfwPlatformDestroyMonitor(monitor);
free(monitor->modes); free(monitor->modes);
free(monitor->name); free(monitor->name);
free(monitor); free(monitor);

View File

@ -181,7 +181,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
return NULL; return NULL;
} }
monitors[found]->win32.name = _wcsdup(adapter.DeviceName); wcscpy(monitors[found]->win32.name, adapter.DeviceName);
found++; found++;
} }
@ -196,11 +196,6 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
return monitors; return monitors;
} }
void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor)
{
free(monitor->win32.name);
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{ {
int modeIndex = 0, count = 0; int modeIndex = 0, count = 0;

View File

@ -192,7 +192,8 @@ typedef struct _GLFWlibraryWin32
//------------------------------------------------------------------------ //------------------------------------------------------------------------
typedef struct _GLFWmonitorWin32 typedef struct _GLFWmonitorWin32
{ {
WCHAR* name; // This size matches the static size of DISPLAY_DEVICE.DeviceName
WCHAR name[32];
} _GLFWmonitorWin32; } _GLFWmonitorWin32;

View File

@ -239,10 +239,6 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* found)
return monitors; return monitors;
} }
void _glfwPlatformDestroyMonitor(_GLFWmonitor* monitor)
{
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{ {
GLFWvidmode* result; GLFWvidmode* result;