From c0bcb1099bf9698a227b60a0dcb35e5e4198c47d Mon Sep 17 00:00:00 2001 From: jyelon Date: Mon, 15 Dec 2025 23:54:55 -0500 Subject: [PATCH] Using CHANNEL_PRINTS to transfer printbuffers to the Unreal text console is now working. --- Source/Integration/LockedWrapper.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Source/Integration/LockedWrapper.cpp b/Source/Integration/LockedWrapper.cpp index 44d87907..dbead4d7 100644 --- a/Source/Integration/LockedWrapper.cpp +++ b/Source/Integration/LockedWrapper.cpp @@ -32,11 +32,17 @@ void FlxLockedWrapper::InitWrapper() { } FString FlxLockedWrapper::FetchStdout() { - uint32_t ndata; const char* data; - Lockable.Wrapper.get_outgoing(Get(), 0, &ndata, &data); - FString result(ndata, (const UTF8CHAR *)data); - Lockable.Wrapper.play_sent_outgoing(Get(), 0, ndata); - return result; + if (Lockable.Wrapper.get_have_prints(Get())) + { + uint32_t ndata; const char* data; + Lockable.Wrapper.play_access(Get(), AccessKind::CHANNEL_PRINTS, 0, 0, "", &ndata, &data); + if (ndata > 0) + { + FString result(ndata, (const UTF8CHAR *)data); + return result; + } + } + return TEXT(""); } int64 FlxLockedWrapper::GetActor() {