Handle debug strings via callback

This commit is contained in:
momo5502
2025-08-10 10:03:12 +02:00
parent 74bff93580
commit 5fbf065937
3 changed files with 9 additions and 2 deletions

View File

@@ -9,11 +9,11 @@ namespace syscalls
{
if (handle == DBWIN_DATA_READY)
{
if (c.proc.dbwin_buffer)
if (c.proc.dbwin_buffer && c.win_emu.callbacks.on_debug_string)
{
constexpr auto pid_length = 4;
const auto debug_data = read_string<char>(c.win_emu.memory, c.proc.dbwin_buffer + pid_length);
c.win_emu.log.info("--> Debug string: %s\n", debug_data.c_str());
c.win_emu.callbacks.on_debug_string(debug_data);
}
return STATUS_SUCCESS;