]>
Commit | Line | Data |
---|---|---|
47903bc6 | 1 | --- War3DSource/Main.cpp.orig 2005-09-11 01:12:53.000000000 +0200 |
2 | +++ War3DSource/Main.cpp 2005-09-11 01:33:17.000000000 +0200 | |
3 | @@ -27,6 +27,8 @@ | |
4 | #include <math.h> | |
5 | #include <stdio.h> | |
6 | ||
7 | +#include <pwd.h> | |
8 | + | |
9 | ||
10 | #ifdef _WIN32 // Windows | |
11 | ||
12 | @@ -106,7 +108,14 @@ | |
13 | ||
14 | glutInit(&argc, argv); | |
15 | ||
16 | - configuracion::leerConfig ("War3D.conf"); | |
17 | + std::string confname; | |
18 | + struct passwd *pwent = getpwuid(getuid()); | |
19 | + if ( pwent && pwent->pw_dir ) { | |
20 | + confname = std::string(pwent->pw_dir) + "/.War3D.conf"; | |
21 | + } else { | |
22 | + confname = "War3D.conf"; | |
23 | + } | |
24 | + configuracion::leerConfig (confname); | |
25 | ||
26 | SetupGL(); | |
27 | SetupRC(); //Inicia la iluminacion y algunas otras cosas |