mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
Fix clamping of screen index value
This commit is contained in:
parent
8e8e05c4f3
commit
a9b4f8ad8c
|
@ -657,7 +657,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
|
|||
m_NumScreens = SDL_GetNumVideoDisplays();
|
||||
if(m_NumScreens > 0)
|
||||
{
|
||||
clamp(*Screen, 0, m_NumScreens-1);
|
||||
*Screen = clamp(*Screen, 0, m_NumScreens-1);
|
||||
if(SDL_GetDisplayBounds(*Screen, &ScreenPos) != 0)
|
||||
{
|
||||
dbg_msg("gfx", "unable to retrieve screen information: %s", SDL_GetError());
|
||||
|
|
Loading…
Reference in a new issue