1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-30 05:58:52 -05:00

Removed reconfiguration callback.

The Core Graphics callback is called before the corresponding NSScreen
object for a newly connected monitor is created, thus making monitor
enumeration fail.
This commit is contained in:
Camilla Berglund 2013-06-05 16:31:05 +02:00
parent 44e8401f7b
commit 4c69535d72

View File

@ -71,13 +71,6 @@ static void changeToResourcesDirectory(void)
#endif /* _GLFW_USE_CHDIR */ #endif /* _GLFW_USE_CHDIR */
static void reconfigurationCallback(CGDirectDisplayID displayID,
CGDisplayChangeSummaryFlags flags,
void* data)
{
_glfwInputMonitorChange();
}
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
////// GLFW platform API ////// ////// GLFW platform API //////
@ -102,12 +95,6 @@ int _glfwPlatformInit(void)
if (!_glfw.ns.eventSource) if (!_glfw.ns.eventSource)
return GL_FALSE; return GL_FALSE;
if (CGDisplayRegisterReconfigurationCallback(reconfigurationCallback,
NULL) != kCGErrorSuccess)
{
return GL_FALSE;
}
CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0); CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0);
return GL_TRUE; return GL_TRUE;
@ -115,8 +102,6 @@ int _glfwPlatformInit(void)
void _glfwPlatformTerminate(void) void _glfwPlatformTerminate(void)
{ {
CGDisplayRemoveReconfigurationCallback(reconfigurationCallback, NULL);
if (_glfw.ns.eventSource) if (_glfw.ns.eventSource)
{ {
CFRelease(_glfw.ns.eventSource); CFRelease(_glfw.ns.eventSource);