From b5b80dde40b056da9726531f59095acd6d6cf90a Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 14 Sep 2010 00:19:17 +0200 Subject: [PATCH] Oh, right, this is C. --- src/fullscreen.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/fullscreen.c b/src/fullscreen.c index b2bd31f1..e8a5dd7c 100644 --- a/src/fullscreen.c +++ b/src/fullscreen.c @@ -39,25 +39,26 @@ static int compareVideoModes(const void* firstPtr, const void* secondPtr) { + int firstBPP, secondBPP, firstSize, secondSize; GLFWvidmode* first = (GLFWvidmode*) firstPtr; GLFWvidmode* second = (GLFWvidmode*) secondPtr; // First sort on color bits per pixel - int firstBPP = first->redBits + - first->greenBits + - first->blueBits; - int secondBPP = second->redBits + - second->greenBits + - second->blueBits; + firstBPP = first->redBits + + first->greenBits + + first->blueBits; + secondBPP = second->redBits + + second->greenBits + + second->blueBits; if (firstBPP != secondBPP) return firstBPP - secondBPP; // Then sort on screen area, in pixels - int firstSize = first->width * first->height; - int secondSize = second->width * second->height; + firstSize = first->width * first->height; + secondSize = second->width * second->height; return firstSize - secondSize; }