discord-rpc: check for custom levels and add placeholder icon (#1531)

* check for custom levels

* fix formatting
This commit is contained in:
Hat Kid
2022-06-24 00:44:42 +02:00
committed by GitHub
parent 3d599ad79b
commit d76ba83747
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ const char* jak1_get_full_level_name(const char* level_name) {
if (nice_name != jak1_level_names.end()) {
return nice_name->second.c_str();
}
return "Unknown";
return "unknown";
};
// time of day string to append to level name for icons
+5 -1
View File
@@ -859,8 +859,12 @@ void update_discord_rpc(u32 discord_info) {
} else {
strcpy(large_image_key, level);
}
rpc.largeImageKey = large_image_key;
strcpy(large_image_text, full_level_name);
if (!strcmp(full_level_name, "unknown")) {
strcpy(large_image_key, full_level_name);
strcpy(large_image_text, level);
}
rpc.largeImageKey = large_image_key;
if (!strcmp(level, "finalboss")) {
strcpy(state, "Fighting Final Boss");
} else if (plantboss != offset_of_s7()) {