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

@@ -169,8 +169,8 @@ SHIM_CALL XamEnumerate_shim(PPCContext* ppc_state, KernelState* state) {
XELOGD("XamEnumerate(%.8X, %d, %.8X, %d, %.8X, %.8X)", handle, zero,
buffer_ptr, buffer_length, item_count_ptr, overlapped_ptr);
XEnumerator* e = nullptr;
if (XFAILED(state->object_table()->GetObject(handle, (XObject**)&e))) {
auto e = state->object_table()->LookupObject<XEnumerator>(handle);
if (!e) {
if (overlapped_ptr) {
state->CompleteOverlappedImmediateEx(overlapped_ptr, 0,
X_ERROR_INVALID_HANDLE, 0);
@@ -198,8 +198,6 @@ SHIM_CALL XamEnumerate_shim(PPCContext* ppc_state, KernelState* state) {
result = X_ERROR_INVALID_PARAMETER;
}
e->Release();
SHIM_SET_RETURN_64(result);
}