device_size_compatibility : added device size detection.