diff options
| author | 2017-10-04 11:52:39 -0500 | |
|---|---|---|
| committer | 2017-10-04 12:30:33 -0500 | |
| commit | 3c0113632dc4fb4e55b5dad9278a5b766dcaec14 (patch) | |
| tree | 5f78f0f8a334a1dbe8e407ed5ef8809241a6b639 /src | |
| parent | SVC: Replace GetPointer usage with Read32 in ReplyAndReceive. (diff) | |
| download | yuzu-3c0113632dc4fb4e55b5dad9278a5b766dcaec14.tar.gz yuzu-3c0113632dc4fb4e55b5dad9278a5b766dcaec14.tar.xz yuzu-3c0113632dc4fb4e55b5dad9278a5b766dcaec14.zip | |
SVC: Replace GetPointer usage with ReadBlock in OutputDebugString.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/function_wrappers.h | 4 | ||||
| -rw-r--r-- | src/core/hle/svc.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h index cd500e83d..cb0b430ee 100644 --- a/src/core/hle/function_wrappers.h +++ b/src/core/hle/function_wrappers.h | |||
| @@ -267,9 +267,9 @@ void Wrap() { | |||
| 267 | func(((s64)PARAM(1) << 32) | PARAM(0)); | 267 | func(((s64)PARAM(1) << 32) | PARAM(0)); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | template <void func(const char*, int len)> | 270 | template <void func(VAddr, int len)> |
| 271 | void Wrap() { | 271 | void Wrap() { |
| 272 | func((char*)Memory::GetPointer(PARAM(0)), PARAM(1)); | 272 | func(PARAM(0), PARAM(1)); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | template <void func(u8)> | 275 | template <void func(u8)> |
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 61360bede..37eeeb860 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -619,8 +619,10 @@ static void Break(u8 break_reason) { | |||
| 619 | } | 619 | } |
| 620 | 620 | ||
| 621 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit | 621 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit |
| 622 | static void OutputDebugString(const char* string, int len) { | 622 | static void OutputDebugString(VAddr address, int len) { |
| 623 | LOG_DEBUG(Debug_Emulated, "%.*s", len, string); | 623 | std::vector<char> string(len); |
| 624 | Memory::ReadBlock(address, string.data(), len); | ||
| 625 | LOG_DEBUG(Debug_Emulated, "%.*s", len, string.data()); | ||
| 624 | } | 626 | } |
| 625 | 627 | ||
| 626 | /// Get resource limit | 628 | /// Get resource limit |