+ /* If we have a DisplayName try to use it for metrics */
+ if( fgDisplay.DisplayName )
+ {
+ HDC context = CreateDC(fgDisplay.DisplayName,0,0,0);
+ if( context )
+ {
+ fgDisplay.ScreenWidth = GetDeviceCaps( context, HORZRES );
+ fgDisplay.ScreenHeight = GetDeviceCaps( context, VERTRES );
+ fgDisplay.ScreenWidthMM = GetDeviceCaps( context, HORZSIZE );
+ fgDisplay.ScreenHeightMM = GetDeviceCaps( context, VERTSIZE );
+ DeleteDC(context);
+ }
+ else
+ fgWarning("fghInitialize: "
+ "CreateDC failed, Screen size info may be incorrect\n"
+ "This is quite likely caused by a bad '-display' parameter");
+
+ }