X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fjoystick.c;h=4a1bc7d5074fcdcbdd0df41599eb72544802cc3e;hb=538b9d9a43db91aad05fbc26dc4f683ef453b278;hp=f092c11d677fa03a0beb7f868aff13efa41d903d;hpb=30eb586d06bc4d1ee7388dced1c20e530292aa93;p=rocksndiamonds.git diff --git a/src/libgame/joystick.c b/src/libgame/joystick.c index f092c11d..4a1bc7d5 100644 --- a/src/libgame/joystick.c +++ b/src/libgame/joystick.c @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // joystick.c // ============================================================================ @@ -17,9 +17,9 @@ #include "misc.h" -/* ========================================================================= */ -/* platform independent joystick functions */ -/* ========================================================================= */ +// ============================================================================ +// platform independent joystick functions +// ============================================================================ #define TRANSLATE_JOYSYMBOL_TO_JOYNAME 0 #define TRANSLATE_JOYNAME_TO_JOYSYMBOL 1 @@ -211,10 +211,11 @@ int JoystickExt(int player_nr, boolean use_as_joystick_nr) if (!ReadJoystick(joystick_nr, &js_x, &js_y, &js_b1, &js_b2)) { - Error(ERR_WARN, "cannot read joystick device '%s'", - setup.input[player_nr].joy.device_name); + Warn("cannot read joystick device '%s'", + setup.input[player_nr].joy.device_name); joystick.status = JOYSTICK_NOT_AVAILABLE; + return JOY_NO_ACTION; } @@ -320,7 +321,7 @@ void DeactivateJoystick(void) void ActivateJoystick(void) { - /* reactivate temporarily deactivated joystick */ + // reactivate temporarily deactivated joystick if (joystick.status & JOYSTICK_AVAILABLE) joystick.status |= JOYSTICK_ACTIVE;