some refactoring with optional_function

- wrapped std::function into utils::optional_function
-- cleaned the code accordingly in windows_emulator
- using the 'emulator'/'windows_emulator' dependency implies the emulator_common as well.
This commit is contained in:
Elias Bachaalany
2025-01-21 19:25:51 -08:00
parent eb613b2214
commit 5bf325c77f
7 changed files with 66 additions and 47 deletions

View File

@@ -2681,7 +2681,7 @@ namespace
temp_buffer.push_back('\n');
}
c.win_emu.on_stdout(temp_buffer);
c.win_emu.callbacks().stdout_callback(temp_buffer);
c.win_emu.log.info("%.*s", static_cast<int>(temp_buffer.size()), temp_buffer.data());
return STATUS_SUCCESS;