]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
#545: Fix ATC chatter sound settings being ignored
[flightgear.git] / src / Main / fg_props.cxx
index 3312889f0cd7e3c2bd847a74c289cbb76ab19326..c12026434453f00a4489499c86517c447134d27b 100644 (file)
@@ -74,7 +74,12 @@ LogClassMapping log_class_mappings [] = {
   LogClassMapping(SG_CLIPPER, "clipper"),
   LogClassMapping(SG_NETWORK, "network"),
   LogClassMapping(SG_INSTR, "instrumentation"),
+  LogClassMapping(SG_ATC, "atc"),
+  LogClassMapping(SG_NASAL, "nasal"),
   LogClassMapping(SG_SYSTEMS, "systems"),
+  LogClassMapping(SG_AI, "ai"),
+  LogClassMapping(SG_ENVIRONMENT, "environment"),
+  LogClassMapping(SG_SOUND, "sound"),
   LogClassMapping(SG_UNDEFD, "")
 };
 
@@ -122,7 +127,7 @@ addLoggingClass (const string &name)
 /**
  * Set the logging classes.
  */
-static void
+void
 setLoggingClasses (const char * c)
 {
   string classes = c;
@@ -142,12 +147,16 @@ setLoggingClasses (const char * c)
 
   string rest = classes;
   string name = "";
-  int sep = rest.find('|');
-  while (sep > 0) {
+  string::size_type sep = rest.find('|');
+  if (sep == string::npos)
+    sep = rest.find(',');
+  while (sep != string::npos) {
     name = rest.substr(0, sep);
     rest = rest.substr(sep+1);
     addLoggingClass(name);
     sep = rest.find('|');
+    if (sep == string::npos)
+      sep = rest.find(',');
   }
   addLoggingClass(rest);
   SG_LOG(SG_GENERAL, SG_INFO, "Set logging classes to "
@@ -183,7 +192,7 @@ getLoggingPriority ()
 /**
  * Set the logging priority.
  */
-static void
+void
 setLoggingPriority (const char * p)
 {
   if (p == 0)
@@ -527,8 +536,8 @@ FGProperties::unbind ()
 
                                // Misc. Temporary junk.
   fgUntie("/sim/temp/winding-ccw");
-  fgUntie("/sim/temp/full-screen");
-  fgUntie("/sim/temp/fdm-data-logging");
+//  fgUntie("/sim/temp/full-screen");
+//  fgUntie("/sim/temp/fdm-data-logging");
 }
 
 void