diff options
| author | Johan Althoff <teetow@gmail.com> | 2007-08-07 18:03:36 +0000 |
|---|---|---|
| committer | Johan Althoff <teetow@gmail.com> | 2007-08-07 18:03:36 +0000 |
| commit | 85ca9f7123728d4fe88a3e33890aed47193ef7fa (patch) | |
| tree | 623a57532e3821fc395c60b3af4f01ff89bb7cdd /src/engine/client | |
| parent | d13c8c728c2fd8ccf52b7d3467a2232a7bd7dc02 (diff) | |
| download | zcatch-85ca9f7123728d4fe88a3e33890aed47193ef7fa.tar.gz zcatch-85ca9f7123728d4fe88a3e33890aed47193ef7fa.zip | |
added support to auto select bitdepth when windowed
Diffstat (limited to 'src/engine/client')
| -rw-r--r-- | src/engine/client/gfx.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/engine/client/gfx.cpp b/src/engine/client/gfx.cpp index 0644f71e..1e11bb04 100644 --- a/src/engine/client/gfx.cpp +++ b/src/engine/client/gfx.cpp @@ -121,12 +121,22 @@ bool gfx_init() { screen_width = config.gfx_screen_width; screen_height = config.gfx_screen_height; - - if(!context.create(screen_width, screen_height, 24, 8, 16, 0, - config.gfx_fullscreen?opengl::context::FLAG_FULLSCREEN:0)) + + if(config.gfx_fullscreen) { - dbg_msg("game", "failed to create gl context"); - return false; + if(!context.create(screen_width, screen_height, 24, 0, 0, 0, opengl::context::FLAG_FULLSCREEN)) + { + dbg_msg("game", "failed to create gl context"); + return false; + } + } + else + { + if(!context.create(screen_width, screen_height, 0, 0, 0, 0, 0)) + { + dbg_msg("game", "failed to create gl context"); + return false; + } } |