Detect device size