trdwll / SteamBridge

An Unreal Engine implementation of the Steamworks API.
https://trdwll.com/experiments/steambridge/
MIT License
134 stars 20 forks source link

Fix crash w/ SteamInput GetConnectedControllers #17

Closed KingKrouch closed 2 years ago

KingKrouch commented 2 years ago

Very special thanks to TekuConcept on UnrealSlackers for helping me debug this code and figure out what's wrong with the crashing issues when using SteamInput's GetConnectedControllers function.

The TArray is just an empty nullptr just being passed in, and it needs to be initialized with STEAM_INPUT_MAX_COUNT.

KingKrouch commented 2 years ago

I also recently bumped into some crashing with GetAnalogActionOrigins and GetDigitalActionOrigins, so I ended up initializing those arrays to prevent the crashing from happening.

I also added Mac as a platform (with the correct Steam API import functions), so that can be used with the plugin.

trdwll commented 2 years ago

Awesome. Thanks for the fixes. 😄