diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..206fba7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +version.h +*.o diff --git a/main.c b/main.c index 339dd42..8fb709a 100644 --- a/main.c +++ b/main.c @@ -20,7 +20,7 @@ #include "version.h" #include "cg_utils.h" - + // Number of modes to list per line. #define MODES_PER_LINE 3 @@ -154,7 +154,7 @@ unsigned int listAvailableModes(CGDirectDisplayID display, int displayNum) { CFRangeMake(0, CFArrayGetCount(allModesSorted)), (CFComparatorFunction) _compareCFDisplayModes, NULL - ); + ); #ifndef LIST_DEBUG if(displayNum != 0) @@ -226,6 +226,9 @@ unsigned int listAvailableModes(CGDirectDisplayID display, int displayNum) { #endif } + if (numModes % MODES_PER_LINE) + printf("\n"); + CFRelease(allModes); CFRelease(allModesSorted);