strat: go all in on ncm::TitleId
This commit is contained in:
@@ -45,14 +45,14 @@ class FsMitmService : public IMitmServiceObject {
|
||||
bool should_override_contents;
|
||||
public:
|
||||
FsMitmService(std::shared_ptr<Service> s, u64 pid) : IMitmServiceObject(s, pid) {
|
||||
if (Utils::HasSdDisableMitMFlag(this->title_id)) {
|
||||
if (Utils::HasSdDisableMitMFlag(static_cast<u64>(this->title_id))) {
|
||||
this->should_override_contents = false;
|
||||
} else {
|
||||
this->should_override_contents = (this->title_id >= TitleId_ApplicationStart || Utils::HasSdMitMFlag(this->title_id)) && Utils::HasOverrideButton(this->title_id);
|
||||
this->should_override_contents = (this->title_id >= sts::ncm::TitleId::ApplicationStart || Utils::HasSdMitMFlag(static_cast<u64>(this->title_id))) && Utils::HasOverrideButton(static_cast<u64>(this->title_id));
|
||||
}
|
||||
}
|
||||
|
||||
static bool ShouldMitm(u64 pid, u64 tid) {
|
||||
static bool ShouldMitm(u64 pid, sts::ncm::TitleId tid) {
|
||||
/* Don't Mitm KIPs */
|
||||
if (pid < 0x50) {
|
||||
return false;
|
||||
@@ -62,11 +62,11 @@ class FsMitmService : public IMitmServiceObject {
|
||||
|
||||
/* TODO: intercepting everything seems to cause issues with sleep mode, for some reason. */
|
||||
/* Figure out why, and address it. */
|
||||
if (tid == TitleId_AppletQlaunch || tid == TitleId_AppletMaintenanceMenu) {
|
||||
if (tid == sts::ncm::TitleId::AppletQlaunch || tid == sts::ncm::TitleId::AppletMaintenanceMenu) {
|
||||
has_launched_qlaunch = true;
|
||||
}
|
||||
|
||||
return has_launched_qlaunch || tid == TitleId_Ns || tid >= TitleId_ApplicationStart || Utils::HasSdMitMFlag(tid);
|
||||
return has_launched_qlaunch || tid == sts::ncm::TitleId::Ns || tid >= sts::ncm::TitleId::ApplicationStart || Utils::HasSdMitMFlag(static_cast<u64>(tid));
|
||||
}
|
||||
|
||||
static void PostProcess(IMitmServiceObject *obj, IpcResponseContext *ctx);
|
||||
|
||||
Reference in New Issue
Block a user