Fixed Mask incorrectness. Does mask_ == 0x01 means accept all?

Affected Games:
- Grid 2 (freezes)
- Skate. (Menu Soundtrack)
- Crackdown 2 Demo (ingame freeze)
This commit is contained in:
Rados??aw Gli??ski 2019-09-01 23:18:37 +02:00 committed by Radosław Gliński
parent 803fa0cba9
commit bea0cc4922
2 changed files with 7 additions and 10 deletions

View File

@ -18,10 +18,7 @@ namespace xe {
namespace kernel {
namespace xam {
dword_result_t XamNotifyCreateListenerInternal(qword_t mask, dword_t unk,
dword_t one) {
// r4=1 may indicate user process?
dword_result_t XamNotifyCreateListenerInternal(qword_t mask) {
auto listener =
object_ref<XNotifyListener>(new XNotifyListener(kernel_state()));
listener->Initialize(mask);
@ -31,11 +28,10 @@ dword_result_t XamNotifyCreateListenerInternal(qword_t mask, dword_t unk,
return handle;
}
DECLARE_XAM_EXPORT2(XamNotifyCreateListenerInternal, kNone, kImplemented,
kSketchy);
DECLARE_XAM_EXPORT1(XamNotifyCreateListenerInternal, kNone, kImplemented);
dword_result_t XamNotifyCreateListener(qword_t mask, dword_t one) {
return XamNotifyCreateListenerInternal(mask, 0, one);
dword_result_t XamNotifyCreateListener(qword_t mask) {
return XamNotifyCreateListenerInternal(mask);
}
DECLARE_XAM_EXPORT1(XamNotifyCreateListener, kNone, kImplemented);
@ -75,7 +71,7 @@ dword_result_t XNotifyGetNext(dword_t handle, dword_t match_id,
return dequeued ? 1 : 0;
}
DECLARE_XAM_EXPORT2(XNotifyGetNext, kNone, kImplemented, kHighFrequency);
DECLARE_XAM_EXPORT1(XNotifyGetNext, kNone, kImplemented);
dword_result_t XNotifyDelayUI(dword_t delay_ms) {
// Ignored.

View File

@ -31,7 +31,8 @@ void XNotifyListener::Initialize(uint64_t mask) {
void XNotifyListener::EnqueueNotification(XNotificationID id, uint32_t data) {
// Ignore if the notification doesn't match our mask.
if ((mask_ & uint64_t(1ULL << (id >> 25))) == 0) {
// TODO(Gliniak): (confirm) mask 0x01 means accept all
if ((mask_ & ((id >> 25) & 0x3F)) == 0 && mask_ != 0x01) {
return;
}