Announcement

Collapse
No announcement yet.

SDL2InputDevice - Simple Direct-Media Layer 2.0 API for advanced Joystick & Controller Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RELEASED] SDL2InputDevice - Simple Direct-Media Layer 2.0 API for advanced Joystick & Controller Support


    Click image for larger version

Name:	ForumPost.png
Views:	51
Size:	198.0 KB
ID:	1834559

    SDL2InputDevice provides a new UE4 input device that utilizes the Simple DirectMedia Layer (SDL2) library. This device can then be used to access or provide more advanced functionality than what is available in the engine by default. It was designed from the start to be as transparent to UE4 as possible. SDL2InputDevice is as its namesake suggests a new input device. This solution means that input is passed into the various game systems of UE4 through the existing input pipeline. With SDL2InputDevice, there is no need for hacky blueprint glue code or special processing

    Marketplace Link: https://www.unrealengine.com/marketp...d2b133e777a5e6

    Features:
    • Low level joystick and Game Controller support including all of the SDL2 Game Controller mappings
    • Supports more than 4 controllers in a single session
    • Utilizes the the existing UE4 input subsystem

    Code Modules: (Please include a full list of each Plugin module and their module type (Runtime, Editor etc.))
    • SDL2InputDevice

    Number of Blueprints: 1 Blueprint Function Library with 9 functions

    Number of C++ Classes: 2

    Network Replicated: Yes

    Supported Development Platforms: Win32, Win64

    Supported Target Build Platforms: Win32, Win64

    Documentation: https://www.wisengineering.com/downl...umentation.pdf


    Joseph Wilcox
    [Technical Director] WisEngineering
    https://www.wisedrl.com

    #2
    I got my hands on the new xbox series x controller and it crashes the project when pressing its xbox button (using the example project)

    Comment


      #3
      Sorry about that. It's a left over bug from when I pulled the code out of the project it was originally used it. The system button doesn't have a UE4 GamepdKey equivalent because typically the OS doesn't pass that through. If you are familar with C++ you can apply a quick fix by making the following change to FSDL2InputDevice::GameControllerButton() in SDL2InputDevice.cpp:

      Change:
      Code:
      FName UE4KeyName = SDL_GameControllerConversionTable.Contains(ButtonID) ? SDL_GameControllerConversionTable[ButtonID] : NAME_None;
      to

      Code:
      FName UE4KeyName = SDL_GameControllerConversionTable.Contains(ButtonID) ? SDL_GameControllerConversionTable[ButtonID] : NAME_None;
      if (UE4KeyName == NAME_None) return;
      That will quick out if there isn't a translation key. If you're blueprint only, I'll try to push a new version as quick as I can.

      Joseph Wilcox
      [Technical Director] WisEngineering
      https://www.wisedrl.com

      Comment

      Working...
      X