Switch back to using callbacks

This commit is contained in:
momo5502
2025-06-04 19:11:16 +02:00
parent 25295707ec
commit 5230909c23
6 changed files with 75 additions and 182 deletions

View File

@@ -76,8 +76,6 @@ void syscall_dispatcher::dispatch(windows_emulator& win_emu)
try
{
const auto* mod = win_emu.mod_manager.find_by_address(address);
const auto entry = this->handlers_.find(syscall_id);
if (entry == this->handlers_.end())
{
@@ -87,14 +85,8 @@ void syscall_dispatcher::dispatch(windows_emulator& win_emu)
return;
}
syscall_event e(c.win_emu, {
.id = syscall_id,
.name = entry->second.name,
});
c.win_emu.manager().handle(e);
if (e.get_output().skip)
const auto res = win_emu.callbacks.on_syscall(syscall_id, entry->second.name);
if (res == instruction_hook_continuation::skip_instruction)
{
return;
}