imagekey with RDB Localization

This commit is contained in:
Cranky Supertoon 2019-12-22 18:51:22 -05:00
parent 801aa13623
commit 68e59320d9
4 changed files with 10 additions and 4 deletions

View File

@ -3355,6 +3355,7 @@ Good Name=Mario Party (U)
Internal Name=MarioParty
Status=Compatible
Counter Factor=1
RPC Key=mp1-u
[82380387-DFC744D9-C:50]
Good Name=Mario Party 2 (E) (M5)
@ -3373,6 +3374,7 @@ Good Name=Mario Party 2 (U)
Internal Name=MarioParty2
Status=Compatible
Counter Factor=1
RPC Key=mp2-u
[C5674160-0F5F453C-C:50]
Good Name=Mario Party 3 (E) (M4)
@ -3394,6 +3396,7 @@ Internal Name=MarioParty3
Status=Compatible
Counter Factor=1
Save Type=16kbit Eeprom
RPC Key=mp3-u
[3BA7CDDC-464E52A0-C:4A]
Good Name=Mario Story (J)

View File

@ -153,6 +153,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
AddHandler(Default_RandomizeSIPIInterrupts, new CSettingTypeApplication("Defaults", "Randomize SI/PI Interrupts", true));
AddHandler(Rdb_GoodName, new CSettingTypeRomDatabase("Good Name", Game_GameName));
AddHandler(Rdb_RPCKey, new CSettingTypeRomDatabase("RPC Key", Game_RPCKey));
AddHandler(Rdb_SaveChip, new CSettingTypeRDBSaveChip("Save Type", (uint32_t)SaveChip_Auto));
#ifdef _DEBUG
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_SyncCores));

View File

@ -119,6 +119,7 @@ enum SettingID
Rdb_CRC_Recalc,
Rdb_UnalignedDMA,
Rdb_RandomizeSIPIInterrupts,
Rdb_RPCKey,
//Individual Game Settings
Game_IniKey,
@ -176,6 +177,7 @@ enum SettingID
Game_FullSpeed,
Game_UnalignedDMA,
Game_RandomizeSIPIInterrupts,
Game_RPCKey,
// General Game running info
GameRunning_LoadingInProgress,

View File

@ -38,8 +38,8 @@ void CDiscord::Update(bool bHaveGame)
//keyState uses the Header of the rom to easily add game pictures through the discord developer panel using the ID above
char szState[256];
char keyState[256];
sprintf(szState, "Playing %s", g_Settings->LoadStringVal(Rdb_GoodName).c_str()); //rdb_GoodName in a variable for use later
sprintf(keyState, "%s", g_Settings->LoadStringVal(Game_GameName).c_str()); //Rom Header in a variable for use later
sprintf(szState, "%s", g_Settings->LoadStringVal(Rdb_GoodName).c_str()); //rdb_GoodName in a variable for use later
sprintf(keyState, "%s", g_Settings->LoadStringVal(Rdb_RPCKey).c_str()); //Game Image Key in a variable for use later
//Load Game Into DiscordRPC
DiscordRichPresence discordPresence = {}; //activates DiscordRPC
@ -56,7 +56,7 @@ void CDiscord::Update(bool bHaveGame)
discordPresence.largeImageText = szState; //sets the RDB_GoodName Variable as the large image text
//Large Image File Name over DiscordRPC
discordPresence.largeImageText = keyState; //sets the Rom Header Variable as the large image key (the file you upload to discord)
discordPresence.largeImageKey = keyState; //sets the Rom Header Variable as the large image key (the file you upload to discord)
//Small Image over DiscordRPC
discordPresence.smallImageKey = "icon"; //Project 64 Logo in bottom right corner
@ -69,7 +69,7 @@ void CDiscord::Update(bool bHaveGame)
//Show when you are not playing a game over DiscordRPC.
// This is not perfect due to Project64's method of loading
// ROM's into the filesystem before emulation starts.
sprintf(szState, "Not in-game"); //shows "Not in-game" on the active DiscordRPC text
discordPresence.details = "Not in-game"; //shows "Not in-game" on the active DiscordRPC text
discordPresence.largeImageKey = "icon"; //Shows the Project64 logo on the large image box
discordPresence.largeImageText = "Project64"; //Name of the Project64 Logo
discordPresence.smallImageKey = NULL; //Safety Measure to force unload the smallImageKey