mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
added support to auto select bitdepth when windowed
This commit is contained in:
parent
d13c8c728c
commit
85ca9f7123
|
@ -122,12 +122,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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Init vertices
|
||||
|
|
Loading…
Reference in a new issue