JoseTomasTocino / freegemas

Freegemas is an open source version of the well known Bejeweled, built in C++ using SDL2
GNU General Public License v2.0
61 stars 18 forks source link

Improve controller management #31

Closed sharkwouter closed 2 years ago

sharkwouter commented 2 years ago

This makes the code a bit cleaner and makes it more visible what is going on under the hood. It makes sure controllers are automatically enabled for use when connected and automatically removed when disconnected. It will disconnect all controllers upon closing the game as well.

sharkwouter commented 2 years ago

I used SDL_Log here, I'm not sure if that's good since Freegemas has a logging implementation itself. I really have my doubts on the value of this logger, though, maybe I should replace it with SDL_Log. A release build should also not include the debug logs.