From 1b8b01af8d1c3c222bed760e2fd21eb35f698b26 Mon Sep 17 00:00:00 2001 From: emoose Date: Sat, 4 Jan 2020 14:34:56 +0000 Subject: [PATCH] [XAM/User] Fix wrong error code given when ReadProfileSettings buffer is too small Strange, seems ReadProfileSettings returns this error as the result code instead of the xoverlapped error code - it could be possible other Xam functions do the same too. This fixes Crackdown loading (thanks Gliniak for the tip about buffer size), hope it doesn't break any other games though. --- src/xenia/kernel/xam/xam_user.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index cefa73be8..42c85e5e8 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -287,7 +287,6 @@ dword_result_t XamUserReadProfileSettings( if (overlapped_ptr) { kernel_state()->CompleteOverlappedImmediate(overlapped_ptr, X_ERROR_INSUFFICIENT_BUFFER); - return X_ERROR_IO_PENDING; } return X_ERROR_INSUFFICIENT_BUFFER; }