diff options
| author | JMC47 <JMC4789@gmail.com> | 2026-01-17 18:23:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-17 18:23:43 -0500 |
| commit | d098f2bba9fac19d90526fb9f7aceb0bb405b4b4 (patch) | |
| tree | 649c0968e57dc001ce0ed9623d05a06876c92764 /Source | |
| parent | cffa4422c92b8ae72a908a00e2422829c9b60d05 (diff) | |
| parent | c54dc9db60051fe8e8cd70b3ae69e07aa9a2a471 (diff) | |
Merge pull request #14274 from JosJuice/jitregister-check-enabled
JitRegister: Check IsEnabled before constructing string
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/JitRegister.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/Common/JitRegister.h b/Source/Core/Common/JitRegister.h index 41f020a2f6..b54a0c2df6 100644 --- a/Source/Core/Common/JitRegister.h +++ b/Source/Core/Common/JitRegister.h @@ -20,6 +20,9 @@ template <typename... Args> inline void Register(const void* base_address, u32 code_size, fmt::format_string<Args...> format, Args&&... args) { + if (!IsEnabled()) + return; + Register(base_address, code_size, fmt::format(format, std::forward<Args>(args)...)); } @@ -27,6 +30,9 @@ template <typename... Args> inline void Register(const void* start, const void* end, fmt::format_string<Args...> format, Args&&... args) { + if (!IsEnabled()) + return; + u32 code_size = (u32)((const char*)end - (const char*)start); Register(start, code_size, fmt::format(format, std::forward<Args>(args)...)); } |
