rnd-20000815-1-src
[rocksndiamonds.git] / src / screens.c
index ddd4def814d661eba2e1ade1a6ff5d63753a01e9..2e206e2186ec05dffb3366cb2eed227a9e436bae 100644 (file)
@@ -327,7 +327,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
        if (setup.autorecord)
          TapeStartRecording();
 
-#ifndef MSDOS
+#if !defined(MSDOS) && !defined(WIN32)
        if (options.network)
          SendToServer_StartPlaying();
        else
@@ -686,7 +686,7 @@ void DrawHelpScreenCreditsText()
   DrawTextFCentered(100, FC_GREEN,
                    "Credits:");
   DrawTextFCentered(ystart + 0 * ystep, FC_YELLOW,
-                   "DOS/Windows port of the game:");
+                   "DOS port of the game:");
   DrawTextFCentered(ystart + 1 * ystep, FC_RED,
                    "Guido Schulz");
   DrawTextFCentered(ystart + 2 * ystep, FC_YELLOW,
@@ -716,13 +716,13 @@ void DrawHelpScreenContactText()
   DrawTextFCentered(ystart + 1 * ystep, FC_YELLOW,
                    "If you like it, send e-mail to:");
   DrawTextFCentered(ystart + 2 * ystep, FC_RED,
-                   "aeglos@valinor.owl.de");
+                   "info@artsoft.org");
   DrawTextFCentered(ystart + 3 * ystep, FC_YELLOW,
                    "or SnailMail to:");
   DrawTextFCentered(ystart + 4 * ystep + 0, FC_RED,
                    "Holger Schemel");
   DrawTextFCentered(ystart + 4 * ystep + 20, FC_RED,
-                   "Oststrasse 11a");
+                   "Detmolder Strasse 189");
   DrawTextFCentered(ystart + 4 * ystep + 40, FC_RED,
                    "33604 Bielefeld");
   DrawTextFCentered(ystart + 4 * ystep + 60, FC_RED,
@@ -1904,8 +1904,12 @@ void CustomizeKeyboard(int player_nr)
              break;
            }
 
+           /* all keys configured -- wait for "Escape" or "Return" key */
+           if (step_nr == 6)
+             break;
+
            /* press 'Enter' to keep the existing key binding */
-           if (key == KEY_Return || step_nr == 6)
+           if (key == KEY_Return)
              key = *customize_step[step_nr].key;
 
            /* check if key already used */
@@ -2087,11 +2091,17 @@ void CalibrateJoystick(int player_nr)
     }
 
 #ifndef MSDOS
+
+#ifdef USE_SDL_LIBRARY
+    joy_ctrl.x = Get_SDL_Joystick_Axis(joystick_fd, 0);
+    joy_ctrl.y = Get_SDL_Joystick_Axis(joystick_fd, 1);
+#else
     if (read(joystick_fd, &joy_ctrl, sizeof(joy_ctrl)) != sizeof(joy_ctrl))
     {
       joystick_status = JOYSTICK_OFF;
       goto error_out;
     }
+#endif
 
     new_joystick_xleft  = MIN(new_joystick_xleft,  joy_ctrl.x);
     new_joystick_xright = MAX(new_joystick_xright, joy_ctrl.x);
@@ -2199,7 +2209,20 @@ void CalibrateJoystick(int player_nr)
   StopAnimation();
 
   DrawSetupInputScreen();
-  while(Joystick(player_nr) & JOY_BUTTON);
+
+  /* wait until the last pressed button was released */
+  while(Joystick(player_nr) & JOY_BUTTON)
+  {
+    if (PendingEvent())                /* got event */
+    {
+      Event event;
+
+      NextEvent(&event);
+      HandleOtherEvents(&event);
+
+      Delay(10);
+    }
+  }
   return;
 
   error_out: