mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-12 11:08:56 +00:00
IOS HLE: STM: Check if there is already an event hook
For IOCTL_STM_EVENTHOOK, IOS checks if there is already an event hook to prevent overriding an existing event hook message with a new one, without first releasing it.
This commit is contained in:
parent
5135445298
commit
23162ac722
1 changed files with 6 additions and 0 deletions
|
@ -106,6 +106,12 @@ IPCCommandResult CWII_IPC_HLE_Device_stm_eventhook::IOCtl(u32 command_address)
|
||||||
return GetDefaultReply();
|
return GetDefaultReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s_event_hook_address != 0)
|
||||||
|
{
|
||||||
|
Memory::Write_U32(FS_EEXIST, command_address + 4);
|
||||||
|
return GetDefaultReply();
|
||||||
|
}
|
||||||
|
|
||||||
// IOCTL_STM_EVENTHOOK waits until the reset button or power button
|
// IOCTL_STM_EVENTHOOK waits until the reset button or power button
|
||||||
// is pressed.
|
// is pressed.
|
||||||
s_event_hook_address = command_address;
|
s_event_hook_address = command_address;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue