]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/bootstrap.cxx
Refactor FG_HOME init, so we can log sooner.
[flightgear.git] / src / Main / bootstrap.cxx
index 399f835407ccca7dd2db9561d4d13f38ffd4011e..a4425c76ab0ed76d08d561e47d18ffd9d855db2d 100644 (file)
@@ -125,7 +125,6 @@ int main ( int argc, char **argv );
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                              LPSTR lpCmdLine, int nCmdShow) {
 
-  logbuf::has_no_console();
   main( __argc, __argv );
 }
 #endif
@@ -164,26 +163,21 @@ static void fg_terminate() {
 int _bootstrap_OSInit;
 
 // Main entry point; catch any exceptions that have made it this far.
-int main ( int argc, char **argv ) {
+int main ( int argc, char **argv )
+{
 #if _MSC_VER
   // Don't show blocking "no disk in drive" error messages on Windows 7,
   // silently return errors to application instead.
   // See Microsoft MSDN #ms680621: "GUI apps should specify SEM_NOOPENFILEERRORBOX"
   SetErrorMode(SEM_NOOPENFILEERRORBOX);
 
-  // Windows has no $HOME aka %HOME%, so we have to construct the full path.
-  homedir = ::getenv("APPDATA");
-  homedir.append("\\flightgear.org");
-
   hostname = ::getenv( "COMPUTERNAME" );
 #else
   // Unix(alike) systems
   char _hostname[256];
   gethostname(_hostname, 256);
   hostname = _hostname;
-  
-  homedir = ::getenv( "HOME" );
-  
+    
   signal(SIGPIPE, SIG_IGN);
 #endif