mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 12:13:57 +00:00
Handle debug strings via callback
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user