- if (vid_fullscreen.integer)
- {
- if (!VID_Mode(true, 640, 480, 16))
- if (!VID_Mode(false, 640, 480, 16))
- Sys_Error("Video modes failed\n");
- }
- else
- Sys_Error("Windowed video failed\n");
+ if (!success && vid_bitsperpixel.integer > 16)
+ success = VID_Mode(vid_fullscreen.integer, vid_width.integer, vid_height.integer, 16);
+ if (!success && (vid_width.integer > 640 || vid_height.integer > 480))
+ success = VID_Mode(vid_fullscreen.integer, 640, 480, 16);
+ if (!success && vid_fullscreen.integer)
+ success = VID_Mode(false, 640, 480, 16);
+ if (!success)
+ Sys_Error("Video modes failed\n");