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 illusion
parent 332e8c0cbb
commit 079fdfceca
2 changed files with 7 additions and 10 deletions

View File

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

View File

@ -31,7 +31,8 @@ void XNotifyListener::Initialize(uint64_t mask) {
void XNotifyListener::EnqueueNotification(XNotificationID id, uint32_t data) { void XNotifyListener::EnqueueNotification(XNotificationID id, uint32_t data) {
// Ignore if the notification doesn't match our mask. // 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; return;
} }