mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 23:19:19 +02:00
DiscordRPC fix when driving ghostview
This commit is contained in:
@@ -219,7 +219,10 @@ void eu07_application::DiscordRPCService()
|
||||
// Discord RPC updater
|
||||
if (simulation::is_ready)
|
||||
{
|
||||
std::string PlayerVehicle = simulation::Train->name();
|
||||
std::string PlayerVehicle;
|
||||
if (simulation::Train != nullptr)
|
||||
{
|
||||
PlayerVehicle = simulation::Train->name();
|
||||
// make to upper
|
||||
for (auto &c : PlayerVehicle)
|
||||
c = toupper(c);
|
||||
@@ -241,6 +244,10 @@ void eu07_application::DiscordRPCService()
|
||||
discord_rpc.smallImageKey = "halt";
|
||||
discord_rpc.smallImageText = Translations.lookup_c("Stopped");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Discord_UpdatePresence(&discord_rpc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user