Skip to content

Commit

Permalink
Get default resolution from Windows desktop resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Asunaya committed Aug 5, 2016
1 parent d21e5a6 commit 617c3f2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Gunz/ZConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,14 @@ bool ZConfiguration::SaveToFile(const char *szFileName, const char* szHeader)
void ZConfiguration::Init()
{
m_Video.bFullScreen = false;
m_Video.nWidth = 1024;
m_Video.nHeight = 768;
auto Width = GetSystemMetrics(SM_CXSCREEN);
if (Width == 0)
Width = 1024;
auto Height = GetSystemMetrics(SM_CYSCREEN);
if (Height == 0)
Height = 768;
m_Video.nWidth = Width;
m_Video.nHeight = Height;
m_Video.nColorBits = 32;
m_Video.nGamma = 255;
m_Video.bShader = true;
Expand Down

0 comments on commit 617c3f2

Please sign in to comment.