From 09fdab7fb4adcd0af10cd131c931796455eedfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 4 Dec 2016 16:16:27 +0100 Subject: [PATCH] HLE: Add a hook for JUTWarningConsole_f JUTWarningConsole_f calls vprintf, but in a way we currently don't handle (which messes up the printed message). However, it is a standard debug print function, so we can directly hook it instead of waiting for the vprintf call. This is necessary to fix debug output in a few games now that vprintf is properly detected in more games. --- Source/Core/Core/HLE/HLE.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/Core/HLE/HLE.cpp b/Source/Core/Core/HLE/HLE.cpp index 024e984e1c..1a0a8b61f4 100644 --- a/Source/Core/Core/HLE/HLE.cpp +++ b/Source/Core/Core/HLE/HLE.cpp @@ -52,6 +52,9 @@ static const SPatch OSPatches[] = { // Debug/OS Support {"OSPanic", HLE_OS::HLE_OSPanic, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG}, + // This needs to be put before vprintf (because vprintf is called indirectly by this) + {"JUTWarningConsole_f", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG}, + {"OSReport", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG}, {"DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG}, {"WUD_DEBUGPrint", HLE_OS::HLE_GeneralDebugPrint, HLE_HOOK_REPLACE, HLE_TYPE_DEBUG},