From 463f21e48459bebb8c1a02a08f0214654bbcef2f Mon Sep 17 00:00:00 2001 From: gibbed Date: Thu, 22 Nov 2018 04:29:35 -0600 Subject: [PATCH] [Kernel] Cleanup XamLoaderSetLaunchData, XamLoaderGetLaunchData. --- src/xenia/kernel/xam/xam_info.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/xenia/kernel/xam/xam_info.cc b/src/xenia/kernel/xam/xam_info.cc index ae6b9fb5d..ac7b33009 100644 --- a/src/xenia/kernel/xam/xam_info.cc +++ b/src/xenia/kernel/xam/xam_info.cc @@ -92,27 +92,24 @@ dword_result_t XamLoaderSetLaunchData(lpvoid_t data, dword_t size) { loader_data.launch_data_present = size ? true : false; loader_data.launch_data.resize(size); std::memcpy(loader_data.launch_data.data(), data, size); - - // FIXME: Unknown return value. return 0; } DECLARE_XAM_EXPORT1(XamLoaderSetLaunchData, kNone, kSketchy); dword_result_t XamLoaderGetLaunchDataSize(lpdword_t size_ptr) { - auto xam = kernel_state()->GetKernelModule("xam.xex"); - auto& loader_data = xam->loader_data(); - if (!size_ptr) { return X_ERROR_INVALID_PARAMETER; } - if (loader_data.launch_data_present) { - *size_ptr = uint32_t(xam->loader_data().launch_data.size()); - return X_ERROR_SUCCESS; + auto xam = kernel_state()->GetKernelModule("xam.xex"); + auto& loader_data = xam->loader_data(); + if (!loader_data.launch_data_present) { + *size_ptr = 0; + return X_ERROR_NOT_FOUND; } - *size_ptr = 0; - return X_ERROR_NOT_FOUND; + *size_ptr = uint32_t(xam->loader_data().launch_data.size()); + return X_ERROR_SUCCESS; } DECLARE_XAM_EXPORT1(XamLoaderGetLaunchDataSize, kNone, kSketchy);