LookupObject'ing code.
This commit is contained in:
@@ -51,8 +51,8 @@ SHIM_CALL XNotifyGetNext_shim(PPCContext* ppc_state, KernelState* state) {
|
||||
}
|
||||
|
||||
// Grab listener.
|
||||
XNotifyListener* listener = NULL;
|
||||
if (XFAILED(state->object_table()->GetObject(handle, (XObject**)&listener))) {
|
||||
auto listener = state->object_table()->LookupObject<XNotifyListener>(handle);
|
||||
if (!listener) {
|
||||
SHIM_SET_RETURN_64(0);
|
||||
return;
|
||||
}
|
||||
@@ -69,10 +69,6 @@ SHIM_CALL XNotifyGetNext_shim(PPCContext* ppc_state, KernelState* state) {
|
||||
dequeued = listener->DequeueNotification(&id, ¶m);
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
listener->Release();
|
||||
}
|
||||
|
||||
if (dequeued) {
|
||||
SHIM_SET_MEM_32(id_ptr, id);
|
||||
SHIM_SET_MEM_32(param_ptr, param);
|
||||
|
||||
Reference in New Issue
Block a user