make sure Game_window_w/h is always set to a valid value in every cockpit mode

This commit is contained in:
zicodxx 2007-05-14 14:02:12 +00:00
parent 05f58c3ed4
commit 4091731e64
2 changed files with 5 additions and 1 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
SConstruct, arch/sdl/init.c, arch/sdl/joydefs.c, arch/sdl/mouse.c, arch/sdl/include/mouse.h, main/game.c, main/inferno.c, main/kconfig.c, main/kconfig.h, main/newmenu.c, main/newmenu.h, main/playsave.c, main/text.h: Added config field to map a Mouse Axis/Wheel to cycle Primary and Secondary weapons; lots of controls-related code cleaning
main/laser.c: fixed speeding bug in homing system
main/game.c: make sure Game_window_w/h is always set to a valid value in every cockpit mode
20070510
--------

View file

@ -424,7 +424,10 @@ void init_cockpit()
switch( Cockpit_mode ) {
case CM_FULL_COCKPIT:
case CM_REAR_VIEW: {
if (!Game_window_h)
Game_window_h = max_window_h;
if (!Game_window_w)
Game_window_w = max_window_w;
if (Cockpit_mode == CM_FULL_COCKPIT)
game_init_render_sub_buffers(0, 0, grd_curscreen->sc_w, (grd_curscreen->sc_h*2)/3);
else if (Cockpit_mode == CM_REAR_VIEW)