mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-05 19:51:45 +00:00
ams.mitm: simplify bpc ShouldMitm logic, fix enum problem
This commit is contained in:
parent
784964d49d
commit
e2a7f23214
2 changed files with 5 additions and 2 deletions
|
@ -21,7 +21,8 @@ enum MitmModuleId : u32 {
|
||||||
MitmModuleId_SetMitm = 1,
|
MitmModuleId_SetMitm = 1,
|
||||||
MitmModuleId_BpcMitm = 2,
|
MitmModuleId_BpcMitm = 2,
|
||||||
|
|
||||||
MitmModuleId_Count = 3,
|
/* Always keep this at the end. */
|
||||||
|
MitmModuleId_Count,
|
||||||
};
|
};
|
||||||
|
|
||||||
void LaunchAllMitmModules();
|
void LaunchAllMitmModules();
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
|
||||||
|
#include "../utils.hpp"
|
||||||
|
|
||||||
enum BpcCmd : u32 {
|
enum BpcCmd : u32 {
|
||||||
BpcCmd_ShutdownSystem = 0,
|
BpcCmd_ShutdownSystem = 0,
|
||||||
BpcCmd_RebootSystem = 1,
|
BpcCmd_RebootSystem = 1,
|
||||||
|
@ -35,7 +37,7 @@ class BpcMitmService : public IMitmServiceObject {
|
||||||
* - fatal, to simplify payload reboot logic significantly
|
* - fatal, to simplify payload reboot logic significantly
|
||||||
* - applications, to allow homebrew to take advantage of the feature.
|
* - applications, to allow homebrew to take advantage of the feature.
|
||||||
*/
|
*/
|
||||||
return tid == 0x0100000000000023ull || tid == 0x0100000000000034ull || tid >= 0x0100000000010000ull;
|
return tid == 0x0100000000000023ull || tid == 0x0100000000000034ull || Utils::IsHblTid(tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx);
|
static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx);
|
||||||
|
|
Loading…
Reference in a new issue