|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-02 02:16:15
|
Module: performous
Branch: opengl2
Commit: 84b9126ce6094ffddd8180ab7b7d722ab12224fe
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 29 17:42:28 2010 +0200
Fix getHomeDir() on Windows.
---
game/fs.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 1978525..83f48d5 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -18,7 +18,11 @@ fs::path getHomeDir() {
static bool initialized = false;
if (!initialized) {
initialized = true;
+ #ifdef _WIN32
+ char const* home = getenv("USERPROFILE");
+ #else
char const* home = getenv("HOME");
+ #endif
if (home) dir = home;
}
return dir;
|