mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-12 07:04:07 -04:00
Add AR Code Whitelist Approval
This commit is contained in:
@@ -2125,13 +2125,16 @@ bool NetPlayServer::SyncCodes()
|
||||
|
||||
// Sync AR Codes
|
||||
{
|
||||
std::vector<ActionReplay::ARCode> codes = ActionReplay::LoadCodes(globalIni, localIni);
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
AchievementManager::GetInstance().FilterApprovedARCodes(codes, game_id);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
// Create an AR Code Vector with just the active codes
|
||||
std::vector<ActionReplay::ARCode> s_active_codes =
|
||||
ActionReplay::ApplyAndReturnCodes(ActionReplay::LoadCodes(globalIni, localIni));
|
||||
std::vector<ActionReplay::ARCode> active_codes = ActionReplay::ApplyAndReturnCodes(codes);
|
||||
|
||||
// Determine Codelist Size
|
||||
u16 codelines = 0;
|
||||
for (const ActionReplay::ARCode& active_code : s_active_codes)
|
||||
for (const ActionReplay::ARCode& active_code : active_codes)
|
||||
{
|
||||
INFO_LOG_FMT(NETPLAY, "Indexing {}", active_code.name);
|
||||
for (const ActionReplay::AREntry& op : active_code.ops)
|
||||
@@ -2159,7 +2162,7 @@ bool NetPlayServer::SyncCodes()
|
||||
pac << MessageID::SyncCodes;
|
||||
pac << SyncCodeID::ARData;
|
||||
// Iterate through the active code vector and send each codeline
|
||||
for (const ActionReplay::ARCode& active_code : s_active_codes)
|
||||
for (const ActionReplay::ARCode& active_code : active_codes)
|
||||
{
|
||||
INFO_LOG_FMT(NETPLAY, "Sending {}", active_code.name);
|
||||
for (const ActionReplay::AREntry& op : active_code.ops)
|
||||
|
||||
Reference in New Issue
Block a user