diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2018-04-13 22:25:34 +0200 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2018-04-13 23:34:35 +0200 |
| commit | 8bae4b7e51d91bb34a53646bb09faf853663797b (patch) | |
| tree | ea9b3f90b78bc2891ea464812f9dd473f318d3f3 | |
| parent | f31221b3d0839e499e3657229dec4664e2d484aa (diff) | |
IOS/STM: Reset the event hook at the correct time
Just re-disassembled STM and found out I have made a mistake when
I changed STM stuff back in 2016.
I accidentally made STM reset the event hook on close when it should
have been done in the destructor (i.e. when IOS gets reset on console).
Verified in IDA that STM just `IOS_ResourceReply(request, IOS_OK)`
without ever resetting the hook.
| -rw-r--r-- | Source/Core/Core/IOS/STM/STM.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/Core/IOS/STM/STM.h | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/Core/IOS/STM/STM.cpp b/Source/Core/Core/IOS/STM/STM.cpp index b9f4e84725..b0e32832f2 100644 --- a/Source/Core/Core/IOS/STM/STM.cpp +++ b/Source/Core/Core/IOS/STM/STM.cpp @@ -66,10 +66,9 @@ IPCCommandResult STMImmediate::IOCtl(const IOCtlRequest& request) return GetDefaultReply(return_value); } -IPCCommandResult STMEventHook::Close(u32 fd) +STMEventHook::~STMEventHook() { s_event_hook_request.reset(); - return Device::Close(fd); } IPCCommandResult STMEventHook::IOCtl(const IOCtlRequest& request) diff --git a/Source/Core/Core/IOS/STM/STM.h b/Source/Core/Core/IOS/STM/STM.h index 87987db7e0..b44de1d6a8 100644 --- a/Source/Core/Core/IOS/STM/STM.h +++ b/Source/Core/Core/IOS/STM/STM.h @@ -55,7 +55,7 @@ class STMEventHook final : public Device { public: using Device::Device; - IPCCommandResult Close(u32 fd) override; + ~STMEventHook() override; IPCCommandResult IOCtl(const IOCtlRequest& request) override; void DoState(PointerWrap& p) override; |
