diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-05 23:13:52 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:53 +0100 |
commit | 309447f2f51e31c46cbf4a7f7def7f7179e68cd4 (patch) | |
tree | 16b12a831e22891a212dd3dde324992388acc766 /src/menu | |
parent | 671bc3532d476cc780138a8a8d41c2d7cf46b13d (diff) | |
download | usdx-309447f2f51e31c46cbf4a7f7def7f7179e68cd4.tar.gz usdx-309447f2f51e31c46cbf4a7f7def7f7179e68cd4.tar.xz usdx-309447f2f51e31c46cbf4a7f7def7f7179e68cd4.zip |
base/config: add graphics.fullscreen option
Diffstat (limited to 'src/menu')
-rw-r--r-- | src/menu/application.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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); |