Greavesy1899 / MafiaToolkit

Open source toolkit for Mafia games. (Mafia II, Mafia III, Mafia DE)
MIT License
123 stars 20 forks source link

Do not interact with Discord RPC if Discord is disabled already #28

Closed RoadTrain closed 4 years ago

RoadTrain commented 4 years ago

Bundled discord-rpc doesn't work under Wine on Linux, so I have disabled it via ini. The problem is that there are still calls to DiscordRPC.Shutdown() even if it's already disabled, e.g. when opening Options window. To avoid that I moved all RPC interactions to DiscordController, and if it's null there are no calls to the RPC.