rnd-20071020-1-src
[rocksndiamonds.git] / src / libgame / misc.c
index 1cbb1c942813e9d3bff20bcf697fb67e37c98222..05dae3dd96449470e069b8de75acc4a7ba5743e4 100644 (file)
@@ -664,6 +664,7 @@ void GetOptions(char *argv[], void (*print_usage_function)(void))
   options.network = FALSE;
   options.verbose = FALSE;
   options.debug = FALSE;
+  options.debug_x11_sync = FALSE;
 
 #if !defined(PLATFORM_UNIX)
   if (*options_left == NULL)   /* no options given -- enable verbose mode */
@@ -789,6 +790,10 @@ void GetOptions(char *argv[], void (*print_usage_function)(void))
     {
       options.debug = TRUE;
     }
+    else if (strncmp(option, "-debug-x11-sync", option_len) == 0)
+    {
+      options.debug_x11_sync = TRUE;
+    }
     else if (strncmp(option, "-execute", option_len) == 0)
     {
       if (option_arg == NULL)
@@ -1595,6 +1600,24 @@ boolean get_boolean_from_string(char *s)
   return result;
 }
 
+int get_switch3_from_string(char *s)
+{
+  char *s_lower = getStringToLower(s);
+  int result = FALSE;
+
+  if (strEqual(s_lower, "true") ||
+      strEqual(s_lower, "yes") ||
+      strEqual(s_lower, "on") ||
+      get_integer_from_string(s) == 1)
+    result = TRUE;
+  else if (strEqual(s_lower, "auto"))
+    result = AUTO;
+
+  free(s_lower);
+
+  return result;
+}
+
 
 /* ------------------------------------------------------------------------- */
 /* functions for generic lists                                               */