Revert "Attempted to fix the detection of screen resolution"

This reverts commit 498577ddd9a448b042f353ecb70fcd418f7a2fd7.