From 31b09f5aacfe8da4148d785a0d8943da82e00f6e Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 11 Feb 2015 13:40:45 -0800 Subject: [PATCH] XUsbcamGetState stub. --- src/xenia/kernel/xboxkrnl_usbcam.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/xenia/kernel/xboxkrnl_usbcam.cc b/src/xenia/kernel/xboxkrnl_usbcam.cc index cba1be0da..8aa233290 100644 --- a/src/xenia/kernel/xboxkrnl_usbcam.cc +++ b/src/xenia/kernel/xboxkrnl_usbcam.cc @@ -17,12 +17,20 @@ namespace xe { namespace kernel { SHIM_CALL XUsbcamCreate_shim(PPCContext* ppc_state, KernelState* state) { - uint32_t unk1 = SHIM_GET_ARG_32(0); - uint32_t unk2 = SHIM_GET_ARG_32(1); + uint32_t unk1 = SHIM_GET_ARG_32(0); // E + uint32_t unk2 = SHIM_GET_ARG_32(1); // 0x4B000 + uint32_t unk3_ptr = SHIM_GET_ARG_32(3); - XELOGD("XUsbcamCreate(%.8X, %.8X)", unk1, unk2); + XELOGD("XUsbcamCreate(%.8X, %.8X, %.8X)", unk1, unk2, unk3_ptr); - SHIM_SET_RETURN_32(-1); + // 0 = success. + SHIM_SET_RETURN_32(X_ERROR_DEVICE_NOT_CONNECTED); +} + +SHIM_CALL XUsbcamGetState_shim(PPCContext* ppc_state, KernelState* state) { + XELOGD("XUsbcamGetState()"); + // 0 = not connected. + SHIM_SET_RETURN_32(0); } } // namespace kernel @@ -31,4 +39,5 @@ SHIM_CALL XUsbcamCreate_shim(PPCContext* ppc_state, KernelState* state) { void xe::kernel::xboxkrnl::RegisterUsbcamExports( ExportResolver* export_resolver, KernelState* state) { SHIM_SET_MAPPING("xboxkrnl.exe", XUsbcamCreate, state); + SHIM_SET_MAPPING("xboxkrnl.exe", XUsbcamGetState, state); }