summaryrefslogtreecommitdiff
path: root/src/utils/env.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-23 22:01:44 +0300
commit3c404128c4669a1f4f190e20a89553677717fc50 (patch)
tree2db4e5031089c800c4e00fd6244e578f44a7c910 /src/utils/env.cpp
parent89b267d6d73bbc59f7c313b8a22b97fbb27f99a8 (diff)
downloadmanaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.gz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.bz2
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.tar.xz
manaverse-3c404128c4669a1f4f190e20a89553677717fc50.zip
Add missing comments into defines.
Diffstat (limited to 'src/utils/env.cpp')
-rw-r--r--src/utils/env.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/env.cpp b/src/utils/env.cpp
index ea53cb2ef..4085f8b50 100644
--- a/src/utils/env.cpp
+++ b/src/utils/env.cpp
@@ -35,7 +35,7 @@ void updateEnv()
setEnv("SDL_VIDEO_CENTERED", "1");
else
setEnv("SDL_VIDEO_CENTERED", "0");
-#endif
+#endif // defined(WIN32) || defined(__APPLE__)
if (config.getBoolValue("allowscreensaver"))
setEnv("SDL_VIDEO_ALLOW_SCREENSAVER", "1");
@@ -60,7 +60,7 @@ void updateEnv()
default:
break;
}
-#endif
+#endif // WIN32
}
void setEnv(const char *const name, const char *const value)
@@ -70,9 +70,10 @@ void setEnv(const char *const name, const char *const value)
#ifdef WIN32
if (putenv(const_cast<char*>((std::string(name)
+ "=" + value).c_str())))
-#else
+#else // WIN32
+
if (setenv(name, value, 1))
-#endif
+#endif // WIN32
{
logger->log("setenv failed: %s=%s", name, value);
}