Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version.h
*.o
7 changes: 5 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "version.h"
#include "cg_utils.h"

// Number of modes to list per line.
#define MODES_PER_LINE 3

Expand Down Expand Up @@ -154,7 +154,7 @@ unsigned int listAvailableModes(CGDirectDisplayID display, int displayNum) {
CFRangeMake(0, CFArrayGetCount(allModesSorted)),
(CFComparatorFunction) _compareCFDisplayModes,
NULL
);
);

#ifndef LIST_DEBUG
if(displayNum != 0)
Expand Down Expand Up @@ -226,6 +226,9 @@ unsigned int listAvailableModes(CGDirectDisplayID display, int displayNum) {
#endif
}

if (numModes % MODES_PER_LINE)
printf("\n");

CFRelease(allModes);
CFRelease(allModesSorted);

Expand Down