diff options
Diffstat (limited to 'src/dirs.cpp')
-rw-r--r-- | src/dirs.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/dirs.cpp b/src/dirs.cpp index 1a39f9e1e..394815a83 100644 --- a/src/dirs.cpp +++ b/src/dirs.cpp @@ -56,14 +56,14 @@ #include <CoreFoundation/CFBundle.h> #endif // __APPLE__ -#ifdef WIN32 +#ifdef _WIN32 PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include <SDL_syswm.h> PRAGMA48(GCC diagnostic pop) #include "fs/specialfolder.h" #undef ERROR -#endif // WIN32 +#endif // _WIN32 #include <sys/stat.h> @@ -245,7 +245,7 @@ void Dirs::mountDataDir() Append_false); #endif // defined __native_client__ -#ifndef WIN32 +#ifndef _WIN32 // Add branding/data to VirtFS search path if (!settings.options.brandingPath.empty()) { @@ -261,7 +261,7 @@ void Dirs::mountDataDir() Append_false); } } -#endif // WIN32 +#endif // _WIN32 } void Dirs::initRootDir() @@ -349,7 +349,7 @@ void Dirs::initLocalDataDir() #elif defined __HAIKU__ settings.localDataDir = pathJoin(VirtFs::getUserDir(), "config/cache/Mana"); -#elif defined WIN32 +#elif defined _WIN32 settings.localDataDir = getSpecialFolderLocation(CSIDL_LOCAL_APPDATA); if (settings.localDataDir.empty()) settings.localDataDir = VirtFs::getUserDir(); @@ -407,7 +407,7 @@ void Dirs::initConfigDir() settings.configDir = pathJoin(VirtFs::getUserDir(), "config/settings/Mana", branding.getValue("appName", "ManaPlus")); -#elif defined WIN32 +#elif defined _WIN32 settings.configDir = getSpecialFolderLocation(CSIDL_APPDATA); if (settings.configDir.empty()) { @@ -499,10 +499,10 @@ void Dirs::initUpdatesDir() settings.updatesDir = updates.str(); } -#ifdef WIN32 +#ifdef _WIN32 if (settings.updatesDir.find(":") != std::string::npos) replaceAll(settings.updatesDir, ":", "_"); -#endif // WIN32 +#endif // _WIN32 const std::string updateDir("/" + settings.updatesDir); @@ -511,7 +511,7 @@ void Dirs::initUpdatesDir() { if (!VirtFs::mkdir(updateDir)) { -#if defined WIN32 +#if defined _WIN32 std::string newDir = pathJoin(settings.localDataDir, settings.updatesDir); if (!CreateDirectory(newDir.c_str(), nullptr) && @@ -523,7 +523,7 @@ void Dirs::initUpdatesDir() errorMessage = _("Error creating updates directory!"); client->setState(State::ERROR); } -#else // defined WIN32 +#else // defined _WIN32 logger->log("Error: %s/%s can't be made, but doesn't exist!", settings.localDataDir.c_str(), @@ -531,7 +531,7 @@ void Dirs::initUpdatesDir() // TRANSLATORS: update server initialisation error errorMessage = _("Error creating updates directory!"); client->setState(State::ERROR); -#endif // defined WIN32 +#endif // defined _WIN32 } } const std::string updateLocal = pathJoin(updateDir, "local"); |