Re: [AD] Android Joysticks (patch)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I already committed this (with added hotplugging and multiple devices). I could add 2.3 support if I had a device, otherwise it's too much trouble for me. Feel free to submit a patch. Thanks for the SDL reference.

Trent

On 2014-12-28 5:28 AM, Phelius wrote:
Trent,

See how SDL does it in SDLActivity.java.
It only compiles in joystick support if API >= 12 otherwise not.
You can still buy android 2.3 devices (I still use mine).
Otherwise, someone should update the android doc to require version 3.x.

Thanks for adding support.

https://stackoverflow.com/questions/13380191/conditional-compiling-in-android

         // Set up the surface
         mSurface = new SDLSurface(getApplication());

         if(Build.VERSION.SDK_INT >= 12) {
             mJoystickHandler = new SDLJoystickHandler_API12();
         }
         else {
             mJoystickHandler = new SDLJoystickHandler();
         }




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/