diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e87fcc7e..f753d17d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,7 @@ include_directories(${GLFW_SOURCE_DIR}/src ${GLFW_BINARY_DIR}/src ${GLFW_INCLUDE_DIR}) -set(common_SOURCES display.c enable.c error.c fullscreen.c gamma.c init.c input.c +set(common_SOURCES monitor.c enable.c error.c fullscreen.c gamma.c init.c input.c joystick.c opengl.c time.c window.c) if(_GLFW_COCOA_NSGL) @@ -41,9 +41,9 @@ elseif(_GLFW_WIN32_WGL) set(libglfw_SOURCES ${common_SOURCES} win32_enable.c win32_fullscreen.c win32_gamma.c win32_init.c win32_joystick.c win32_opengl.c win32_time.c win32_window.c - win32_dllmain.c win32_display.c) + win32_dllmain.c win32_monitor.c) elseif(_GLFW_X11_GLX) - set(libglfw_SOURCES ${common_SOURCES} x11_display.c x11_enable.c + set(libglfw_SOURCES ${common_SOURCES} x11_monitor.c x11_enable.c x11_fullscreen.c x11_gamma.c x11_init.c x11_joystick.c x11_keysym2unicode.c x11_opengl.c x11_time.c x11_window.c) diff --git a/src/display.c b/src/monitor.c similarity index 100% rename from src/display.c rename to src/monitor.c diff --git a/src/win32_display.c b/src/win32_monitor.c similarity index 98% rename from src/win32_display.c rename to src/win32_monitor.c index 1d0518ca..71361daf 100644 --- a/src/win32_display.c +++ b/src/win32_monitor.c @@ -52,7 +52,7 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, DISPLAY_DEVICE* adapte DeleteDC(dc); - (*monitor)->deviceName = _glfwMalloc(strlen(monitor->DeviceName) + 1); + (*current)->deviceName = _glfwMalloc(strlen(monitor->DeviceName) + 1); memcpy((*current)->deviceName, monitor->DeviceName, strlen(monitor->DeviceName) + 1); (*current)->deviceName[strlen(monitor->DeviceName)] = '\0'; diff --git a/src/x11_display.c b/src/x11_monitor.c similarity index 98% rename from src/x11_display.c rename to src/x11_monitor.c index 6d9feccb..6a3c5dec 100644 --- a/src/x11_display.c +++ b/src/x11_monitor.c @@ -47,7 +47,7 @@ _GLFWmonitor** _glfwCreateMonitor(_GLFWmonitor** current, XRROutputInfo* outputI (*current)->physicalWidth = outputInfo->mm_width; (*current)->physicalHeight = outputInfo->mm_height; - (*monitor)->deviceName = _glfwMalloc(strlen(outputInfo->name) + 1); + (*current)->deviceName = _glfwMalloc(strlen(outputInfo->name) + 1); memcpy((*current)->deviceName, outputInfo->name, strlen(outputInfo->name) + 1); (*current)->deviceName[strlen(outputInfo->name)] = '\0';