diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index c84ef56bf8..a71360a1af 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -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 diff --git a/src/client/Client.cpp b/src/client/Client.cpp index d06870b196..2458b20526 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -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) diff --git a/src/client/Client.h b/src/client/Client.h index ee54a2ff42..ee25017242 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -50,14 +50,14 @@ class ClientListener; class Client: public Singleton { private: std::string messageOfTheDay; - std::vector > serverNotifications; + std::vector > serverNotifications; void * versionCheckRequest; bool updateAvailable; UpdateInfo updateInfo; - std::string lastError; + bool firstRun; std::list stampIDs; unsigned lastStampTime; @@ -108,6 +108,7 @@ class Client: public Singleton { void Initialise(std::string proxyString); void SetProxy(std::string proxy); + bool IsFirstRun(); int MakeDirectory(const char * dirname); bool WriteFile(std::vector fileData, std::string filename); diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 8a8f1dfdb3..aec8ef7172 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -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