From 9b3cdd06451cf961f84adc9075b776264ba8a5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 15 Dec 2020 18:42:12 +0100 Subject: [PATCH] IOS/WD: Report game quirk if unimplemented ioctl is used Lets us find games to test more easily. --- Source/Core/Core/Analytics.cpp | 5 +++-- Source/Core/Core/Analytics.h | 2 ++ Source/Core/Core/IOS/Network/WD/Command.cpp | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Analytics.cpp b/Source/Core/Core/Analytics.cpp index 2b8e65be1d..a0b4fc2175 100644 --- a/Source/Core/Core/Analytics.cpp +++ b/Source/Core/Core/Analytics.cpp @@ -133,7 +133,7 @@ void DolphinAnalytics::ReportGameStart() } // Keep in sync with enum class GameQuirk definition. -constexpr std::array GAME_QUIRKS_NAMES{"icache-matters", +constexpr std::array GAME_QUIRKS_NAMES{"icache-matters", "directly-reads-wiimote-input", "uses-DVDLowStopLaser", "uses-DVDLowOffset", @@ -145,7 +145,8 @@ constexpr std::array GAME_QUIRKS_NAMES{"icache-matters", "uses-di-interrupt-command", "mismatched-gpu-texgens-between-xf-and-bp", "mismatched-gpu-colors-between-xf-and-bp", - "uses-uncommon-wd-mode"}; + "uses-uncommon-wd-mode", + "uses-wd-unimplemented-ioctl"}; static_assert(GAME_QUIRKS_NAMES.size() == static_cast(GameQuirk::COUNT), "Game quirks names and enum definition are out of sync."); diff --git a/Source/Core/Core/Analytics.h b/Source/Core/Core/Analytics.h index 1d9ac59053..6416257b93 100644 --- a/Source/Core/Core/Analytics.h +++ b/Source/Core/Core/Analytics.h @@ -59,6 +59,8 @@ enum class GameQuirk // are used by games and the system menu respectively. USES_UNCOMMON_WD_MODE, + USES_WD_UNIMPLEMENTED_IOCTL, + COUNT, }; diff --git a/Source/Core/Core/IOS/Network/WD/Command.cpp b/Source/Core/Core/IOS/Network/WD/Command.cpp index 4f22cfaa1b..0f6eb0b49d 100644 --- a/Source/Core/Core/IOS/Network/WD/Command.cpp +++ b/Source/Core/Core/IOS/Network/WD/Command.cpp @@ -377,7 +377,8 @@ IPCCommandResult NetWDCommand::IOCtlV(const IOCtlVRequest& request) case IOCTLV_WD_CHANGE_GAMEINFO: case IOCTLV_WD_CHANGE_VTSF: default: - request.Dump(GetDeviceName(), Common::Log::IOS_NET, Common::Log::LINFO); + DolphinAnalytics::Instance().ReportGameQuirk(GameQuirk::USES_WD_UNIMPLEMENTED_IOCTL); + request.Dump(GetDeviceName(), Common::Log::IOS_NET, Common::Log::LWARNING); } return GetDefaultReply(IPC_SUCCESS);