]> git.pld-linux.org Git - packages/War3D.git/blob - War3D-homeconfig.patch
- massive change ( validate errors warrings from desktop-file-validate)
[packages/War3D.git] / War3D-homeconfig.patch
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
This page took 0.065011 seconds and 3 git commands to generate.