Add support for resolutions up to 1024x768

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>