In glcGetBestMonitor(), I suggest initialising the bestArea variable to INT_MIN rather than 0.
Consider the case where the window is entirely outside monitor's bounds. The area calculation result would be negative, yet can still be the nearest 'best' choice.
In glcGetBestMonitor(), I suggest initialising the bestArea variable to INT_MIN rather than 0.
Consider the case where the window is entirely outside monitor's bounds. The area calculation result would be negative, yet can still be the nearest 'best' choice.