On first run, set scale to 2 if screen size is large enough

This commit is contained in:
jacob1 2015-05-14 23:22:20 -04:00
parent 0a2b60627f
commit cee08b2024
4 changed files with 17 additions and 4 deletions

View File

@ -834,6 +834,11 @@ int main(int argc, char * argv[])
tempScale = 1;
SDLOpen();
if (Client::Ref().IsFirstRun() && desktopWidth > WINDOWW*2 && desktopHeight > WINDOWH*2)
{
tempScale = 2;
Client::Ref().SetPref("Scale", 2);
}
#ifdef WIN
LoadWindowPosition(tempScale);
#endif

View File

@ -126,7 +126,10 @@ Client::Client():
#ifndef MACOSX
configFile.close();
#endif
firstRun = false;
}
else
firstRun = true;
}
void Client::Initialise(std::string proxyString)
@ -173,6 +176,11 @@ void Client::Initialise(std::string proxyString)
}
}
bool Client::IsFirstRun()
{
return firstRun;
}
bool Client::DoInstallation()
{
#if defined(WIN)

View File

@ -56,8 +56,8 @@ private:
bool updateAvailable;
UpdateInfo updateInfo;
std::string lastError;
bool firstRun;
std::list<std::string> stampIDs;
unsigned lastStampTime;
@ -108,6 +108,7 @@ public:
void Initialise(std::string proxyString);
void SetProxy(std::string proxy);
bool IsFirstRun();
int MakeDirectory(const char * dirname);
bool WriteFile(std::vector<unsigned char> fileData, std::string filename);

View File

@ -753,9 +753,8 @@ void GameController::Tick()
((LuaScriptInterface*)commandInterface)->Init();
#endif
#if !defined(MACOSX) && !defined(NO_INSTALL_CHECK)
if(!Client::Ref().GetPrefBool("InstallCheck", false))
if (Client::Ref().IsFirstRun())
{
Client::Ref().SetPref("InstallCheck", true);
Install();
}
#endif