diff options
author | Mai <mai.iam2048@gmail.com> | 2023-02-05 08:26:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 08:26:52 +0100 |
commit | 037300014385d7dd25029d7aac188f325f1e5bc3 (patch) | |
tree | be79f36453a4735088d9230e02f426792077eeb4 /src/core/hle/kernel/svc/svc_debug_string.cpp | |
parent | Merge pull request #9720 from SoRadGaming/discordPresenceUpdate (diff) | |
parent | kernel/svc: Split implementations into separate files (diff) | |
download | yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.gz yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.bz2 yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.lz yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.xz yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.tar.zst yuzu-037300014385d7dd25029d7aac188f325f1e5bc3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc/svc_debug_string.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc/svc_debug_string.cpp b/src/core/hle/kernel/svc/svc_debug_string.cpp new file mode 100644 index 000000000..486e62cc4 --- /dev/null +++ b/src/core/hle/kernel/svc/svc_debug_string.cpp @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/core.h" +#include "core/hle/kernel/svc.h" +#include "core/memory.h" + +namespace Kernel::Svc { + +/// Used to output a message on a debug hardware unit - does nothing on a retail unit +void OutputDebugString(Core::System& system, VAddr address, u64 len) { + if (len == 0) { + return; + } + + std::string str(len, '\0'); + system.Memory().ReadBlock(address, str.data(), str.size()); + LOG_DEBUG(Debug_Emulated, "{}", str); +} + +void OutputDebugString32(Core::System& system, u32 address, u32 len) { + OutputDebugString(system, address, len); +} + +} // namespace Kernel::Svc |