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; tempScale = 1;
SDLOpen(); SDLOpen();
if (Client::Ref().IsFirstRun() && desktopWidth > WINDOWW*2 && desktopHeight > WINDOWH*2)
{
tempScale = 2;
Client::Ref().SetPref("Scale", 2);
}
#ifdef WIN #ifdef WIN
LoadWindowPosition(tempScale); LoadWindowPosition(tempScale);
#endif #endif

View File

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

View File

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

View File

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