From 4091731e641960eb6fd8cedd682e0d1e7af3f244 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Mon, 14 May 2007 14:02:12 +0000 Subject: [PATCH] make sure Game_window_w/h is always set to a valid value in every cockpit mode --- CHANGELOG.txt | 1 + main/game.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 535367f9e..75ccd214f 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 -------- diff --git a/main/game.c b/main/game.c index d0b39392c..6bf897ca5 100755 --- a/main/game.c +++ b/main/game.c @@ -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)