From 15ca94f41b77cdf439774fe1e6502979be9d3f8e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 6 Feb 2008 00:56:15 +0000 Subject: console scroll --- src/client/video.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/client/video.cc') diff --git a/src/client/video.cc b/src/client/video.cc index f7ae792..19555ec 100644 --- a/src/client/video.cc +++ b/src/client/video.cc @@ -84,7 +84,8 @@ bool init() SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 2); SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); - flags = SDL_OPENGL | SDL_FULLSCREEN; + if (r_fullscreen->value()) flags = SDL_OPENGL | SDL_FULLSCREEN; + else flags = SDL_OPENGL; if(!SDL_SetVideoMode(width, height, bpp, flags )) { con_warn << "Failed to set video mode " << width << "x" << height << "x" << bpp << "bpp" << std::endl; @@ -101,14 +102,15 @@ bool init() con_print << " video mode " << width << "x" << height << "x" << bpp << "bpp" << std::endl; aspect = (float) width / (float) height; - + (*r_width) = width; + (*r_height) = height; render::init(); + video::reset(); + view::init(); - video::reset(); - return true; } -- cgit v1.2.3