On first run, set scale to 2 if screen size is large enough
This commit is contained in:
parent
0a2b60627f
commit
cee08b2024
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -50,14 +50,14 @@ class ClientListener;
|
|||||||
class Client: public Singleton<Client> {
|
class Client: public Singleton<Client> {
|
||||||
private:
|
private:
|
||||||
std::string messageOfTheDay;
|
std::string messageOfTheDay;
|
||||||
std::vector<std::pair<std::string, std::string> > serverNotifications;
|
std::vector<std::pair<std::string, std::string> > serverNotifications;
|
||||||
|
|
||||||
void * versionCheckRequest;
|
void * versionCheckRequest;
|
||||||
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);
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user