Fixed mingw compile errors.

This commit is contained in:
Marcel Metz 2012-01-31 23:47:01 +01:00
parent a69974403e
commit 5a16042c8a
3 changed files with 7 additions and 2 deletions

View File

@ -229,7 +229,7 @@ int _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, GLFWvidmode* list, int ma
}
if (list && maxcount)
memcpy(list, vidModes, sizeof(GLFWvidmode) * min(vidModesCount, maxcount));
memcpy(list, vidModes, sizeof(GLFWvidmode) * ((vidModesCount < maxcount) ? vidModesCount : maxcount));
free(vidModes);

View File

@ -38,6 +38,11 @@
#define EDS_ROTATEDMODE 0x00000004
#endif
// The MinGW upstream lacks this
#ifndef DISPLAY_DEVICE_ACTIVE
#define DISPLAY_DEVICE_ACTIVE 0x00000001
#endif
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////

View File

@ -47,7 +47,7 @@
#include <windows.h>
#include <mmsystem.h>
#include <Dbt.h>
#include <dbt.h>
// This path may need to be changed if you build GLFW using your own setup
// We ship and use our own copy of wglext.h since GLFW uses fairly new