Detect display resolution.