From 4908754d84df1734c556aaae1ba657e21aa7c677 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Thu, 27 Aug 2020 13:22:47 +0200 Subject: [PATCH] [Base] Use enum instead of define for X_MEM_* --- src/xenia/xbox.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 998def9ee..93cec9614 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -118,18 +118,20 @@ typedef uint32_t X_HRESULT; #define X_E_NO_SUCH_USER X_HRESULT_FROM_WIN32(X_ERROR_NO_SUCH_USER) // MEM_*, used by NtAllocateVirtualMemory -#define X_MEM_COMMIT 0x00001000 -#define X_MEM_RESERVE 0x00002000 -#define X_MEM_DECOMMIT 0x00004000 -#define X_MEM_RELEASE 0x00008000 -#define X_MEM_FREE 0x00010000 -#define X_MEM_PRIVATE 0x00020000 -#define X_MEM_RESET 0x00080000 -#define X_MEM_TOP_DOWN 0x00100000 -#define X_MEM_NOZERO 0x00800000 -#define X_MEM_LARGE_PAGES 0x20000000 -#define X_MEM_HEAP 0x40000000 -#define X_MEM_16MB_PAGES 0x80000000 // from Valve SDK +enum X_MEM : uint32_t { + X_MEM_COMMIT = 0x00001000, + X_MEM_RESERVE = 0x00002000, + X_MEM_DECOMMIT = 0x00004000, + X_MEM_RELEASE = 0x00008000, + X_MEM_FREE = 0x00010000, + X_MEM_PRIVATE = 0x00020000, + X_MEM_RESET = 0x00080000, + X_MEM_TOP_DOWN = 0x00100000, + X_MEM_NOZERO = 0x00800000, + X_MEM_LARGE_PAGES = 0x20000000, + X_MEM_HEAP = 0x40000000, + X_MEM_16MB_PAGES = 0x80000000 // from Valve SDK +}; // PAGE_*, used by NtAllocateVirtualMemory #define X_PAGE_NOACCESS 0x00000001