pull in 686155bc0a5026113c02b3287e621dc11eb57353

This commit is contained in:
R2DLiu 2023-08-01 16:04:03 -04:00
commit 837c1f65f9
4 changed files with 19 additions and 4 deletions

View file

@ -2940,7 +2940,7 @@ void CEXISlippi::handleCompleteSet(const SlippiExiTypes::ReportSetCompletionQuer
auto lastMatchId = recentMmResult.id;
if (lastMatchId.find("mode.ranked") != std::string::npos)
{
ERROR_LOG_FMT(SLIPPI_ONLINE, "Reporting set completion: {}", lastMatchId);
INFO_LOG_FMT(SLIPPI_ONLINE, "Reporting set completion: {}", lastMatchId);
game_reporter->ReportCompletion(lastMatchId, query.endMode);
}
}

View file

@ -1,15 +1,15 @@
#include "SlippiGameReporter.h"
#include "Common/Common.h"
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Common/Logging/Log.h"
#include "Common/MsgHandler.h"
#include "Common/StringUtil.h"
#include "Common/Thread.h"
#include "Common/Common.h"
#include "Core/ConfigManager.h"
#include "Core/Slippi/SlippiMatchmaking.h"
#include "VideoCommon/OnScreenDisplay.h"
#include <codecvt>
#include <locale>
@ -104,6 +104,14 @@ SlippiGameReporter::SlippiGameReporter(SlippiUser* user, const std::string curre
std::array<u8, 16> md5_array;
mbedtls_md_file(s_md5_info, current_file_name.c_str(), md5_array.data());
this->m_iso_hash = std::string(md5_array.begin(), md5_array.end());
if (known_desync_isos.find(this->m_iso_hash) != known_desync_isos.end() &&
known_desync_isos.at(this->m_iso_hash))
{
OSD::AddTypedMessage(OSD::MessageType::DesyncWarning,
"\n\n\n\nCAUTION: You are using an ISO that is known to cause desyncs",
20000, OSD::Color::RED);
}
INFO_LOG_FMT(SLIPPI_ONLINE, "MD5 Hash: {}", this->m_iso_hash);
});
m_md5_thread.detach();

View file

@ -69,6 +69,13 @@ protected:
std::vector<std::string> m_player_uids;
std::unordered_map<std::string, bool> known_desync_isos = {
{"23d6baef06bd65989585096915da20f2", true},
{"27a5668769a54cd3515af47b8d9982f3", true},
{"5805fa9f1407aedc8804d0472346fc5f", true},
{"9bb3e275e77bb1a160276f2330f93931", true},
};
SlippiUser* m_user;
std::string m_iso_hash;
std::queue<GameReport> game_report_queue;

View file

@ -15,7 +15,7 @@ enum class MessageType
NetPlayPing,
NetPlayBuffer,
PerformanceWarning,
DesyncWarning,
// This entry must be kept last so that persistent typed messages are
// displayed before other messages
Typeless,