mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Oh, right, this is C.
This commit is contained in:
parent
973ff494ac
commit
b5b80dde40
@ -39,15 +39,16 @@
|
|||||||
|
|
||||||
static int compareVideoModes(const void* firstPtr, const void* secondPtr)
|
static int compareVideoModes(const void* firstPtr, const void* secondPtr)
|
||||||
{
|
{
|
||||||
|
int firstBPP, secondBPP, firstSize, secondSize;
|
||||||
GLFWvidmode* first = (GLFWvidmode*) firstPtr;
|
GLFWvidmode* first = (GLFWvidmode*) firstPtr;
|
||||||
GLFWvidmode* second = (GLFWvidmode*) secondPtr;
|
GLFWvidmode* second = (GLFWvidmode*) secondPtr;
|
||||||
|
|
||||||
// First sort on color bits per pixel
|
// First sort on color bits per pixel
|
||||||
|
|
||||||
int firstBPP = first->redBits +
|
firstBPP = first->redBits +
|
||||||
first->greenBits +
|
first->greenBits +
|
||||||
first->blueBits;
|
first->blueBits;
|
||||||
int secondBPP = second->redBits +
|
secondBPP = second->redBits +
|
||||||
second->greenBits +
|
second->greenBits +
|
||||||
second->blueBits;
|
second->blueBits;
|
||||||
|
|
||||||
@ -56,8 +57,8 @@ static int compareVideoModes(const void* firstPtr, const void* secondPtr)
|
|||||||
|
|
||||||
// Then sort on screen area, in pixels
|
// Then sort on screen area, in pixels
|
||||||
|
|
||||||
int firstSize = first->width * first->height;
|
firstSize = first->width * first->height;
|
||||||
int secondSize = second->width * second->height;
|
secondSize = second->width * second->height;
|
||||||
|
|
||||||
return firstSize - secondSize;
|
return firstSize - secondSize;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user