Index: /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 444)
+++ /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 445)
@@ -556,4 +556,5 @@
              "  -[no]csam                Enable or disable CSAM\n"
              "  -[no]hwvirtex            Permit or deny the usage of VMX/SVN\n"
+             "  -warpdrive <1..20000>    The virtual time rate as percent, with 100 as the normal rate.\n"
 #endif
              "\n");
@@ -705,4 +706,5 @@
     unsigned fCSAM  = ~0U;
     TriStateBool_T fHWVirt = TriStateBool_Default;
+    uint32_t u32WarpDrive = 0;
 #endif
 #ifdef VBOX_WIN32_UI
@@ -1133,4 +1135,20 @@
         else if (strcmp(argv[curArg], "-nohwvirtex") == 0)
             fHWVirt = TriStateBool_False;
+        else if (strcmp(argv[curArg], "-warpdrive") == 0)
+        {
+            if (++curArg >= argc)
+            {
+                RTPrintf("Error: missing the rate value for the -warpdrive option!\n");
+                rc = E_FAIL;
+                break;
+            }
+            u32WarpDrive = RTStrToUInt32(argv[curArg]);
+            if (u32WarpDrive < 2 || u32WarpDrive > 20000)
+            {
+                RTPrintf("Error: the warp drive rate is restricted to [2..20000]. (%d)\n", u32WarpDrive);
+                rc = E_FAIL;
+                break;
+            }
+        }
 #endif /* VBOXSDL_ADVANCED_OPTIONS */
 #ifdef VBOX_WIN32_UI
@@ -1767,4 +1785,13 @@
     {
         gMachine->COMSETTER(HWVirtExEnabled)(fHWVirt);
+    }
+    if (u32WarpDrive != 0)
+    {
+        if (!gMachineDebugger)
+        {
+            RTPrintf("Error: No debugger object; -warpdrive %d cannot be executed!\n", u32WarpDrive);
+            goto leave;
+        }
+        gMachineDebugger->COMSETTER(VirtualTimeRate)(u32WarpDrive);
     }
 #endif /* VBOXSDL_ADVANCED_OPTIONS */
@@ -3090,19 +3117,19 @@
 static void UpdateTitlebar(TitlebarMode mode, uint32_t u32User)
 {
-    static char pszTitle[1024] = {0};
+    static char szTitle[1024] = {0};
 
     /* back up current title */
-    char pszPrevTitle[1024];
-    strcpy(pszPrevTitle, pszTitle);
-
-
-    strcpy(pszTitle, "InnoTek VirtualBox - ");
+    char szPrevTitle[1024];
+    strcpy(szPrevTitle, szTitle);
+
+
+    strcpy(szTitle, "InnoTek VirtualBox - ");
 
     Bstr name;
     gMachine->COMGETTER(Name)(name.asOutParam());
     if (name)
-        strcat(pszTitle, Utf8Str(name).raw());
+        strcat(szTitle, Utf8Str(name).raw());
     else
-        strcat(pszTitle, "<noname>");
+        strcat(szTitle, "<noname>");
 
 
@@ -3115,8 +3142,8 @@
             gMachine->COMGETTER(State)(&machineState);
             if (machineState == MachineState_Paused)
-                strcat(pszTitle, " - [Paused]");
+                strcat(szTitle, " - [Paused]");
 
             if (gfGrabbed)
-                strcat(pszTitle, " - [Input captured]");
+                strcat(szTitle, " - [Input captured]");
 
             // do we have a debugger interface
@@ -3132,4 +3159,5 @@
                 BOOL logEnabled = FALSE;
                 BOOL hwVirtEnabled = FALSE;
+                ULONG virtualTimeRate = 100;
                 gMachineDebugger->COMGETTER(RecompileSupervisor)(&recompileSupervisor);
                 gMachineDebugger->COMGETTER(RecompileUser)(&recompileUser);
@@ -3139,13 +3167,19 @@
                 gMachineDebugger->COMGETTER(Singlestep)(&singlestepEnabled);
                 gMachineDebugger->COMGETTER(HWVirtExEnabled)(&hwVirtEnabled);
-                RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
-                            " [STEP=%d CS=%d PAT=%d RR0=%d RR3=%d LOG=%d HWVirt=%d]",
+                gMachineDebugger->COMGETTER(VirtualTimeRate)(&virtualTimeRate);
+                RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
+                            " [STEP=%d CS=%d PAT=%d RR0=%d RR3=%d LOG=%d HWVirt=%d",
                             singlestepEnabled == TRUE, csamEnabled == TRUE, patmEnabled == TRUE,
                             recompileSupervisor == FALSE, recompileUser == FALSE,
                             logEnabled == TRUE, hwVirtEnabled == TRUE);
+                char *psz = strchr(szTitle, '\0');
+                if (virtualTimeRate != 100)
+                    RTStrPrintf(psz, &szTitle[sizeof(szTitle)] - psz, " WD=%d%%]", virtualTimeRate);
+                else
+                    RTStrPrintf(psz, &szTitle[sizeof(szTitle)] - psz, "]");
 #else
                 BOOL hwVirtEnabled = FALSE;
                 gMachineDebugger->COMGETTER(HWVirtExEnabled)(&hwVirtEnabled);
-                RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
+                RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
                             "%s", hwVirtEnabled ? " (HWVirtEx)" : "");
 #endif /* DEBUG */
@@ -3162,5 +3196,5 @@
             gMachine->COMGETTER(State)(&machineState);
             if (machineState == MachineState_Starting)
-                strcat(pszTitle, " - Starting...");
+                strcat(szTitle, " - Starting...");
             else if (machineState == MachineState_Restoring)
             {
@@ -3168,8 +3202,8 @@
                 HRESULT rc = gProgress->COMGETTER(Percent)(&cPercentNow);
                 if (SUCCEEDED(rc))
-                    RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
+                    RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
                                 " - Restoring %d%%...", (int)cPercentNow);
                 else
-                    RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
+                    RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
                                 " - Restoring...");
             }
@@ -3181,5 +3215,5 @@
         {
             AssertMsg(u32User >= 0 && u32User <= 100, ("%d\n", u32User));
-            RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
+            RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
                         " - Saving %d%%...", u32User);
             break;
@@ -3189,5 +3223,5 @@
         {
             AssertMsg(u32User >= 0 && u32User <= 100, ("%d\n", u32User));
-            RTStrPrintf(pszTitle + strlen(pszTitle), sizeof(pszTitle) - strlen(pszTitle),
+            RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
                         " - Taking snapshot %d%%...", u32User);
             break;
@@ -3202,5 +3236,5 @@
      * Don't update if it didn't change.
      */
-    if (strcmp(pszTitle, pszPrevTitle) == 0)
+    if (strcmp(szTitle, szPrevTitle) == 0)
         return;
 
@@ -3209,7 +3243,7 @@
      */
 #ifdef VBOX_WIN32_UI
-    setUITitle(pszTitle);
+    setUITitle(szTitle);
 #else
-    SDL_WM_SetCaption(pszTitle, "InnoTek VirtualBox");
+    SDL_WM_SetCaption(szTitle, "InnoTek VirtualBox");
 #endif
 }
