mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 12:13:57 +00:00
Move more logging into callbacks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "std_include.hpp"
|
||||
#include "io_device.hpp"
|
||||
#include "windows_emulator.hpp"
|
||||
#include "devices/afd_endpoint.hpp"
|
||||
#include "devices/mount_point_manager.hpp"
|
||||
#include "devices/security_support_provider.hpp"
|
||||
@@ -49,3 +50,31 @@ std::unique_ptr<io_device> create_device(const std::u16string_view device)
|
||||
|
||||
throw std::runtime_error("Unsupported device: " + u16_to_u8(device));
|
||||
}
|
||||
|
||||
NTSTATUS io_device_container::io_control(windows_emulator& win_emu, const io_device_context& context)
|
||||
{
|
||||
this->assert_validity();
|
||||
win_emu.callbacks.on_ioctrl(*this->device_, this->device_name_, context.io_control_code);
|
||||
return this->device_->io_control(win_emu, context);
|
||||
}
|
||||
|
||||
void io_device_container::work(windows_emulator& win_emu)
|
||||
{
|
||||
this->assert_validity();
|
||||
this->device_->work(win_emu);
|
||||
}
|
||||
|
||||
void io_device_container::serialize_object(utils::buffer_serializer& buffer) const
|
||||
{
|
||||
this->assert_validity();
|
||||
|
||||
buffer.write_string(this->device_name_);
|
||||
this->device_->serialize(buffer);
|
||||
}
|
||||
|
||||
void io_device_container::deserialize_object(utils::buffer_deserializer& buffer)
|
||||
{
|
||||
buffer.read_string(this->device_name_);
|
||||
this->setup();
|
||||
this->device_->deserialize(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user