diff --git a/src/monitor.c b/src/monitor.c index 2d2d532d..1f19bf7d 100644 --- a/src/monitor.c +++ b/src/monitor.c @@ -238,7 +238,7 @@ void _glfwSplitBPP(int bpp, int* red, int* green, int* blue) // Return the currently connected monitors //======================================================================== -GLFWAPI GLFWmonitor* glfwGetMonitors(int* count) +GLFWAPI const GLFWmonitor* glfwGetMonitors(int* count) { if (!_glfwInitialized) { @@ -375,7 +375,7 @@ GLFWAPI void glfwSetMonitorCallback(GLFWmonitorfun cbfun) // Get a list of available video modes //======================================================================== -GLFWAPI GLFWvidmode* glfwGetVideoModes(GLFWmonitor handle, int* count) +GLFWAPI const GLFWvidmode* glfwGetVideoModes(GLFWmonitor handle, int* count) { _GLFWmonitor* monitor = (_GLFWmonitor*) handle; diff --git a/tests/modes.c b/tests/modes.c index ecf54258..d8121425 100644 --- a/tests/modes.c +++ b/tests/modes.c @@ -49,7 +49,7 @@ static void usage(void) printf(" modes -h\n"); } -static const char* format_mode(GLFWvidmode* mode) +static const char* format_mode(const GLFWvidmode* mode) { static char buffer[512]; @@ -94,7 +94,7 @@ static void list_modes(GLFWmonitor monitor) { int count, widthMM, heightMM, dpi, i; GLFWvidmode mode; - GLFWvidmode* modes = glfwGetVideoModes(monitor, &count); + const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count); glfwGetVideoMode(monitor, &mode); @@ -125,11 +125,11 @@ static void list_modes(GLFWmonitor monitor) static void test_modes(GLFWmonitor monitor) { int i, count; - GLFWvidmode* modes = glfwGetVideoModes(monitor, &count); + const GLFWvidmode* modes = glfwGetVideoModes(monitor, &count); for (i = 0; i < count; i++) { - GLFWvidmode* mode = modes + i; + const GLFWvidmode* mode = modes + i; GLFWvidmode current; glfwWindowHint(GLFW_RED_BITS, mode->redBits); @@ -210,7 +210,7 @@ static void test_modes(GLFWmonitor monitor) int main(int argc, char** argv) { int ch, i, count, mode = LIST_MODE; - GLFWmonitor* monitors; + const GLFWmonitor* monitors; while ((ch = getopt(argc, argv, "th")) != -1) {