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 046b534f3a
commit 90ee584b28
2 changed files with 5 additions and 0 deletions

View file

@ -4,6 +4,7 @@ D2X-Rebirth Changelog
--------
SConstruct, arch/sdl/init.c, arch/sdl/joydefs.c, arch/sdl/mouse.c, arch/include/mouse.h, include/error.h, main/config.h main/game.c, main/gamecntl.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
20070512
--------

View file

@ -377,6 +377,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);
}