Ignore:
Timestamp:
Jul 21, 2014, 12:50:29 AM (8 years ago)
Author:
jjsimpso
Message:

sdlport: Add support for SDL2, inculding the game controller API. Configure
script will check for SDL2 and use it if present, otherwise it will fall
back to SDL v1. Some old SDL v1 features not implemented yet on SDL2, such
as saving screenshots.

core: Small change for SDL2 game controller API to disable the game
controller in the save/load game menu.

Summary of game controller API changes:

  • Enable with -gamepad
  • Tested with PS3 dualshock 3.
  • D-pad moves, right analog controls aiming
  • X: change weapon, []: jump, R1: fire, L1: special ability, /\:use/activate
  • All menu navigation requires the mouse, which is disabled during normal game play.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/event.h

    r682 r731  
    9090    }
    9191
     92  // To enable/disable game controller
     93  // enables switching between mouse and gamepad when entering certain screens
     94  // Added for SDL2 game controller support
     95  void enable_controller(bool enabled)
     96  {
     97      controller_enabled = enabled;
     98  }
     99
    92100private:
    93101    linked_list m_events;
     
    95103
    96104    image *m_screen;
     105    bool controller_enabled;
    97106
    98107protected:
Note: See TracChangeset for help on using the changeset viewer.