[Linux/FreeBSD] Initial screen displayed incorrectly
Initial screen (spinning wheel on black background) displayed incorrectly if screen resolution more than 640x480. It looks like 640x480 picture placed in the left bottom corner of screen.
How to repeat:
Start doomsday in high resolution:
doomsday -wh 1280 1024 -g ...
1.9.7 build 364
The problem occurs on 2 computers:
1. Linux (Fedora 16), VGA - nVidia GF9600GT with nVidia driver version 290.10.
2. FreeBSD 9.0, VGA - nVidia GF7600GS with nVidia driver version 285.05.09.
There is NO such problem on WindowsXP professional SP2.
#2 Updated by vvv1 over 10 years ago
The problem appears due to double SDL_SetVideoMode. First SDL_SetVideoMode is called from createMainWindow() in doomsday/engine/(unix|win32|...)/src/dd_uinit.c and sets 640x480 windowed mode. Second SDL_SetVideoMode is called from doomsday/engine/portable/src/dd_main.c after command line parsing and sets required resolution, fullscreen or windowed. Viewport by default is set to 0,0 640x480 by the first SDL_SetVideoMode and stays unchanged after second call. The attached patch sets glViewport according to current resolution just after SDL_SetVideoMode.
It isn't good idea to set video mode twice. It will be enough to set it once after command line parsing.
#3 Updated by vvv1 over 10 years ago
#5 Updated by vvv1 about 10 years ago