LookupObject'ing code.

This commit is contained in:
Ben Vanik
2015-05-24 21:37:28 -07:00
parent 018e9a96e1
commit a2b66f9109
8 changed files with 164 additions and 221 deletions

View File

@@ -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, &param);
}
if (listener) {
listener->Release();
}
if (dequeued) {
SHIM_SET_MEM_32(id_ptr, id);
SHIM_SET_MEM_32(param_ptr, param);