1
0
forked from 0ad/0ad

Restrict the initial window size to the screen size (hopefully fixes #532).

This was SVN commit r8915.
This commit is contained in:
Ykkrosh 2011-02-12 21:21:07 +00:00
parent 608c7f0e70
commit c7056490b2

View File

@ -142,6 +142,15 @@ bool CVideoMode::InitSDL()
h = DEFAULT_WINDOW_H;
}
if (!m_ConfigFullscreen)
{
// Limit the window to the screen size (if known)
if (m_PreferredW)
w = std::min(w, m_PreferredW);
if (m_PreferredH)
h = std::min(h, m_PreferredH);
}
int bpp = GetBestBPP();
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);