We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 356

Summary: Dummy joystick driver not compiled in for Unix platforms which are not Linux
Product: SDL Reporter: Patrice Mandin <patmandin>
Component: joystickAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: laurent
Version: 1.2.11   
Hardware: Other   
OS: Solaris   

Description Patrice Mandin 2006-11-03 08:14:48 UTC
--Some part of configure.in--
AC_ARG_ENABLE(joystick,
AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
              , enable_joystick=yes)
if test x$enable_joystick != xyes; then
    AC_DEFINE(SDL_JOYSTICK_DISABLED)
fi

[snip]

  /* For all Unix-like, be it Linux, Bsd, Solaris, ... */
        if test x$enable_joystick = xyes; then
          case $ARCH in
            linux)
                AC_DEFINE(SDL_JOYSTICK_LINUX)
                SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
                have_joystick=yes
            ;;
          esac
        fi

[snip]

if test x$have_joystick != xyes; then
    if test x$enable_joystick = xyes; then
        AC_DEFINE(SDL_JOYSTICK_DISABLED)
    fi
    SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
fi

-- In src/joystick/dummy/SDL_sysjoystick.c
#if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED)
/* dummy joystick support */
#endif

By default, we have --enable-joystick, which sets enable_joystick=yes.
Only Linux has joystick support, so have_joystick=no.
In the latest test, SDL_JOYSTICK_DISABLED is not defined (enable_joystick=yes),
and SDL_JOYSTICK_DUMMY is not defined anywhere in configure.in, so dummy
joystick driver will be compiled.
Comment 1 Patrice Mandin 2006-11-03 08:17:01 UTC
Oops, latest phrase finish is "so dummy joystick driver will *NOT* be compiled".
Comment 2 Ryan C. Gordon 2006-11-03 12:59:09 UTC
Fixed in svn revision #2897 for 1.3 branch and svn revision #2898 for 1.2 branch.

Thanks,
--ryan.

Comment 3 Ryan C. Gordon 2007-02-12 06:57:24 UTC
*** Bug 350 has been marked as a duplicate of this bug. ***