From fa40308d091433843a711521fd860454e8faa344 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Tue, 10 Feb 2015 23:32:25 -0800 Subject: [PATCH] Oh, that's why I did it - these aren't /actually/ HRESULTs. --- src/xenia/xbox.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 577366285..2a247ae84 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -66,9 +66,11 @@ typedef uint32_t X_STATUS; // HRESULT (ERROR_*) // Adding as needed. +// For some reason, half of these aren't *actually* HRESULTs. +// Windows is a weird place. typedef uint32_t X_RESULT; #define X_FACILITY_WIN32 7 -#define X_HRESULT_FROM_WIN32(x) ((X_RESULT)(x) <= 0 ? ((X_RESULT)(x)) : ((X_RESULT) (((x) & 0x0000FFFF) | (X_FACILITY_WIN32 << 16) | 0x80000000))) +#define X_HRESULT_FROM_WIN32(x) x //((X_RESULT)(x) <= 0 ? ((X_RESULT)(x)) : ((X_RESULT) (((x) & 0x0000FFFF) | (X_FACILITY_WIN32 << 16) | 0x80000000))) #define X_ERROR_SUCCESS X_HRESULT_FROM_WIN32(0x00000000L) #define X_ERROR_ACCESS_DENIED X_HRESULT_FROM_WIN32(0x00000005L) #define X_ERROR_INVALID_HANDLE X_HRESULT_FROM_WIN32(0x00000006L)