From 309447f2f51e31c46cbf4a7f7def7f7179e68cd4 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 5 Sep 2012 23:13:52 +0200 Subject: base/config: add graphics.fullscreen option --- src/menu/application.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/menu/application.cpp') diff --git a/src/menu/application.cpp b/src/menu/application.cpp index d0cb9926..1e82b6e2 100644 --- a/src/menu/application.cpp +++ b/src/menu/application.cpp @@ -145,12 +145,14 @@ namespace usdx char env[] = "SDL_VIDEO_CENTERED=center"; SDL_putenv(env); - // create screen - display = SDL_SetVideoMode(get_width(), - get_height(), - 24, - SDL_OPENGL); + // fullscreen if requested from config + Uint32 flags = SDL_OPENGL; + if (config->get_graphics_fullscreen()) { + flags |= SDL_FULLSCREEN; + } + // create screen + display = SDL_SetVideoMode(get_width(), get_height(), 24, flags); glViewport(0, 0, get_width(), get_height()); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); -- cgit v1.2.3