From 0078ec0ad9f474362cdb704009ae677b7472159b Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 18 Feb 2023 10:23:35 +0100 Subject: [PATCH] Make sure all enums are 4 bytes --- include/avm/drc.h | 2 ++ include/camera/camera.h | 3 +++ include/coreinit/bsp.h | 2 ++ include/coreinit/codegen.h | 1 + include/coreinit/context.h | 1 + include/coreinit/cosreport.h | 2 ++ include/coreinit/debug.h | 2 +- include/coreinit/dynload.h | 6 ++++- include/coreinit/event.h | 1 + include/coreinit/exception.h | 2 ++ include/coreinit/filesystem.h | 9 +++++++ include/coreinit/filesystem_fsa.h | 16 +++++++++--- include/coreinit/im.h | 3 +++ include/coreinit/interrupts.h | 1 + include/coreinit/ios.h | 2 ++ include/coreinit/kernel.h | 1 + include/coreinit/mcp.h | 4 +++ include/coreinit/memexpheap.h | 2 ++ include/coreinit/memfrmheap.h | 1 + include/coreinit/memheap.h | 4 +++ include/coreinit/memory.h | 2 ++ include/coreinit/memorymap.h | 1 + include/coreinit/messagequeue.h | 2 ++ include/coreinit/screen.h | 1 + include/coreinit/smd.h | 4 +++ include/coreinit/taskqueue.h | 2 ++ include/coreinit/thread.h | 4 +++ include/coreinit/userconfig.h | 4 +++ include/dmae/mem.h | 1 + include/gx2/debug.h | 3 +++ include/gx2/enum.h | 43 +++++++++++++++++++++++++++++++ include/gx2/utils.h | 1 + include/gx2r/resource.h | 1 + include/h264/decode.h | 1 + include/h264/stream.h | 1 + include/mic/mic.h | 2 ++ include/nn/ccr/sys.h | 1 + include/nn/cmpt/cmpt.h | 1 + include/nn/ffl/miidata.h | 1 + include/nn/save/save.h | 1 + include/nn/temp/temp.h | 1 + include/nsysccr/cdc.h | 3 +++ include/nsyshid/hid.h | 1 + include/nsyskbd/nsyskbd.h | 2 ++ include/nsysnet/netconfig.h | 12 +++++++++ include/nsysnet/nssl.h | 2 ++ include/nsysuhs/uhs.h | 4 +++ include/padscore/kpad.h | 1 + include/padscore/wpad.h | 7 +++++ include/proc_ui/procui.h | 2 ++ include/sndcore2/core.h | 2 ++ include/sndcore2/device.h | 2 ++ include/sndcore2/drcvs.h | 5 ++++ include/sndcore2/result.h | 1 + include/sndcore2/voice.h | 7 +++++ include/sysapp/args.h | 2 ++ include/sysapp/switch.h | 1 + include/sysapp/title.h | 1 + include/vpad/input.h | 8 ++++++ 59 files changed, 200 insertions(+), 6 deletions(-) diff --git a/include/avm/drc.h b/include/avm/drc.h index 89a27e8ac..be0d4164f 100644 --- a/include/avm/drc.h +++ b/include/avm/drc.h @@ -18,6 +18,7 @@ typedef enum AVMDrcScanMode AVM_DRC_SCAN_MODE_UNKNOWN_3 = 3, AVM_DRC_SCAN_MODE_UNKNOWN_255 = 255, } AVMDrcScanMode; +WUT_CHECK_SIZE(AVMDrcScanMode, 4); typedef enum AVMDrcMode { @@ -25,6 +26,7 @@ typedef enum AVMDrcMode AVM_DRC_MODE_SINGLE = 1, AVM_DRC_MODE_DOUBLE = 2, } AVMDrcMode; +WUT_CHECK_SIZE(AVMDrcMode, 4); BOOL AVMGetDRCScanMode(AVMDrcScanMode *outScanMode); diff --git a/include/camera/camera.h b/include/camera/camera.h index a50341f77..84e795bd0 100644 --- a/include/camera/camera.h +++ b/include/camera/camera.h @@ -44,17 +44,20 @@ typedef enum CamError CAMERA_ERROR_DEVICE_IN_USE = -12, CAMERA_ERROR_SEGMENT_VIOLATION = -14 } CamError; +WUT_CHECK_SIZE(CamError, 4); typedef enum CamFps { CAMERA_FPS_15, CAMERA_FPS_30 } CamFps; +WUT_CHECK_SIZE(CamFps, 4); typedef enum CamStreamType { CAMERA_STREAM_TYPE_1 } CamStreamType; +WUT_CHECK_SIZE(CamStreamType, 4); struct CAMEventData { diff --git a/include/coreinit/bsp.h b/include/coreinit/bsp.h index 6193dc08e..fe382a9c6 100644 --- a/include/coreinit/bsp.h +++ b/include/coreinit/bsp.h @@ -22,6 +22,7 @@ typedef enum BSPErrors BSP_ERROR_IOS_ERROR = 0x40, BSP_ERROR_RESPONSE_TOO_LARGE = 0x80, } BSPErrors; +WUT_CHECK_SIZE(BSPErrors, 4); typedef enum BSPHardwareVersions { @@ -58,6 +59,7 @@ typedef enum BSPHardwareVersions BSP_HARDWARE_VERSION_LATTE_B1X_CAT = 0x26100020, BSP_HARDWARE_VERSION_LATTE_B1X_CAFE = 0x26100028 } BSPHardwareVersions; +WUT_CHECK_SIZE(BSPHardwareVersions, 4); BSPError bspInitializeShimInterface(); diff --git a/include/coreinit/codegen.h b/include/coreinit/codegen.h index 819a3e15c..b5a6b52a3 100644 --- a/include/coreinit/codegen.h +++ b/include/coreinit/codegen.h @@ -37,6 +37,7 @@ typedef enum OSCodegenSecMode //! The area can be read or executed, but not written to. CODEGEN_R_X = 1, } OSCodegenSecMode; +WUT_CHECK_SIZE(OSCodegenSecMode, 4); /** * Gets the location and size of codegen memory, if available. diff --git a/include/coreinit/context.h b/include/coreinit/context.h index 3ab2c4763..df94baf03 100644 --- a/include/coreinit/context.h +++ b/include/coreinit/context.h @@ -19,6 +19,7 @@ enum OS_CONTEXT_STATE { OS_CONTEXT_STATE_OSCALLBACK = 1 << 3, OS_CONTEXT_STATE_USERMODE_SAVED = 1 << 4 }; +WUT_CHECK_SIZE(enum OS_CONTEXT_STATE, 4); typedef struct OSContext OSContext; diff --git a/include/coreinit/cosreport.h b/include/coreinit/cosreport.h index b9547697b..c512d59d6 100644 --- a/include/coreinit/cosreport.h +++ b/include/coreinit/cosreport.h @@ -18,6 +18,7 @@ typedef enum COSReportLevel{ COS_REPORT_LEVEL_INFO = 2, COS_REPORT_LEVEL_VERBOSE = 3, } COSReportLevel; +WUT_CHECK_SIZE(COSReportLevel, 4); typedef enum COSReportModule{ COS_REPORT_MODULE_UNKNOWN_0 = 0, @@ -25,6 +26,7 @@ typedef enum COSReportModule{ COS_REPORT_MODULE_UNKNOWN_2 = 2, COS_REPORT_MODULE_UNKNOWN_5 = 5, } COSReportModule; +WUT_CHECK_SIZE(COSReportModule, 4); void COSVReport(COSReportModule module, diff --git a/include/coreinit/debug.h b/include/coreinit/debug.h index 7a10b9063..930829163 100644 --- a/include/coreinit/debug.h +++ b/include/coreinit/debug.h @@ -19,7 +19,7 @@ typedef enum DisassemblePPCFlags { DISASSEMBLE_PPC_FLAGS_NONE = 0, } DisassemblePPCFlags; - +WUT_CHECK_SIZE(DisassemblePPCFlags, 4); void OSConsoleWrite(const char *msg, diff --git a/include/coreinit/dynload.h b/include/coreinit/dynload.h index f17631d90..e3d77460a 100644 --- a/include/coreinit/dynload.h +++ b/include/coreinit/dynload.h @@ -33,8 +33,9 @@ typedef enum OSDynLoad_Error OS_DYNLOAD_INVALID_ALLOCATOR_PTR = 0xBAD10017, OS_DYNLOAD_OUT_OF_SYSTEM_MEMORY = 0xBAD1002F, OS_DYNLOAD_TLS_ALLOCATOR_LOCKED = 0xBAD10031, - OS_DYNLOAD_MODULE_NOT_FOUND = -6, + OS_DYNLOAD_MODULE_NOT_FOUND = 0xFFFFFFFA, } OSDynLoad_Error; +WUT_CHECK_SIZE(OSDynLoad_Error, 4); typedef OSDynLoad_Error (*OSDynLoadAllocFn)(int32_t size, int32_t align, void **outAddr); typedef void (*OSDynLoadFreeFn)(void *addr); @@ -43,12 +44,14 @@ typedef enum OSDynLoad_ExportType { OS_DYNLOAD_EXPORT_FUNC = 0, OS_DYNLOAD_EXPORT_DATA = 1, } OSDynLoad_ExportType; +WUT_CHECK_SIZE(OSDynLoad_ExportType, 4); typedef enum OSDynLoad_EntryReason { OS_DYNLOAD_LOADED = 0, OS_DYNLOAD_UNLOADED = 1, } OSDynLoad_EntryReason; +WUT_CHECK_SIZE(OSDynLoad_EntryReason, 4); struct OSDynLoad_NotifyData { @@ -201,6 +204,7 @@ typedef enum OSDynLoad_NotifyReason OS_DYNLOAD_NOTIFY_UNLOADED = 0, OS_DYNLOAD_NOTIFY_LOADED = 1 } OSDynLoad_NotifyReason; +WUT_CHECK_SIZE(OSDynLoad_NotifyReason, 4); typedef void (*OSDynLoadNotifyFunc)(OSDynLoad_Module module, void *userContext, diff --git a/include/coreinit/event.h b/include/coreinit/event.h index 7d94397f1..7168a6881 100644 --- a/include/coreinit/event.h +++ b/include/coreinit/event.h @@ -27,6 +27,7 @@ typedef enum OSEventMode //! An auto event will reset everytime a thread is woken. OS_EVENT_MODE_AUTO = 1, } OSEventMode; +WUT_CHECK_SIZE(OSEventMode, 4); #define OS_EVENT_TAG 0x65566E54u diff --git a/include/coreinit/exception.h b/include/coreinit/exception.h index 6d17e69b8..d35403064 100644 --- a/include/coreinit/exception.h +++ b/include/coreinit/exception.h @@ -22,6 +22,7 @@ typedef enum OSExceptionMode OS_EXCEPTION_MODE_THREAD_ALL_CORES = 3, OS_EXCEPTION_MODE_GLOBAL_ALL_CORES = 4, } OSExceptionMode; +WUT_CHECK_SIZE(OSExceptionMode, 4); typedef enum OSExceptionType { @@ -41,6 +42,7 @@ typedef enum OSExceptionType OS_EXCEPTION_TYPE_SYSTEM_INTERRUPT = 13, OS_EXCEPTION_TYPE_ICI = 14, } OSExceptionType; +WUT_CHECK_SIZE(OSExceptionType, 4); OSExceptionCallbackFn OSSetExceptionCallback(OSExceptionType exceptionType, diff --git a/include/coreinit/filesystem.h b/include/coreinit/filesystem.h index 3dd8b7528..6af675a87 100644 --- a/include/coreinit/filesystem.h +++ b/include/coreinit/filesystem.h @@ -67,6 +67,7 @@ typedef enum FSErrorFlag FS_ERROR_FLAG_JOURNAL_FULL = 0x800, FS_ERROR_FLAG_ALL = 0xFFFFFFFF, } FSErrorFlag; +WUT_CHECK_SIZE(FSErrorFlag, 4); typedef enum FSStatus { @@ -90,6 +91,7 @@ typedef enum FSStatus FS_STATUS_CORRUPTED = -18, FS_STATUS_FATAL_ERROR = -0x400, } FSStatus; +WUT_CHECK_SIZE(FSStatus, 4); typedef enum FSError { @@ -132,6 +134,7 @@ typedef enum FSError FS_ERROR_WRITE_PROTECTED = -0x30042, FS_ERROR_INVALID_MEDIA = -0x30043, } FSError; +WUT_CHECK_SIZE(FSError, 4); typedef enum FSMode { @@ -147,6 +150,7 @@ typedef enum FSMode FS_MODE_WRITE_OTHER = 0x002, FS_MODE_EXEC_OTHER = 0x001, } FSMode; +WUT_CHECK_SIZE(FSMode, 4); //! Flags for \link FSStat \endlink. //! One can return multiple flags, so for example a file that's encrypted or a linked directory. @@ -164,6 +168,7 @@ typedef enum FSStatFlags //! Note: It's currently not known how one can read the linked-to file entry. FS_STAT_LINK = 0x00010000, } FSStatFlags; +WUT_CHECK_SIZE(FSStatFlags, 4); typedef enum FSVolumeState { @@ -180,6 +185,7 @@ typedef enum FSVolumeState FS_VOLUME_STATE_FATAL = 10, FS_VOLUME_STATE_INVALID = 11, } FSVolumeState; +WUT_CHECK_SIZE(FSVolumeState, 4); typedef enum FSMediaState { FS_MEDIA_STATE_READY = 0, @@ -188,11 +194,13 @@ typedef enum FSMediaState { FS_MEDIA_STATE_DIRTY_MEDIA = 3, FS_MEDIA_STATE_MEDIA_ERROR = 4, } FSMediaState; +WUT_CHECK_SIZE(FSMediaState, 4); typedef enum FSMountSourceType { FS_MOUNT_SOURCE_SD = 0, FS_MOUNT_SOURCE_UNK = 1, } FSMountSourceType; +WUT_CHECK_SIZE(FSMountSourceType, 4); typedef enum FSOpenFileFlags { @@ -203,6 +211,7 @@ typedef enum FSOpenFileFlags //! Preallocates new file size using given size FS_OPEN_FLAG_PREALLOC_SIZE = (1 << 1) } FSOpenFileFlags; +WUT_CHECK_SIZE(FSOpenFileFlags, 4); typedef void(*FSAsyncCallback)(FSClient *, FSCmdBlock *, FSStatus, uint32_t); typedef void(*FSStateChangeCallback)(FSClient *, FSVolumeState, void *); diff --git a/include/coreinit/filesystem_fsa.h b/include/coreinit/filesystem_fsa.h index 764161655..47862afbc 100644 --- a/include/coreinit/filesystem_fsa.h +++ b/include/coreinit/filesystem_fsa.h @@ -115,6 +115,7 @@ typedef enum FSAMountPriority { FSA_MOUNT_PRIORITY_TITLE_UPDATE = 0x9, FSA_MOUNT_PRIORITY_UNMOUNT_ALL = 0x80000000, } FSAMountPriority; +WUT_CHECK_SIZE(FSAMountPriority, 4); typedef enum FSAQueryInfoType { FSA_QUERY_INFO_FREE_SPACE_SIZE = 0x0, @@ -127,16 +128,19 @@ typedef enum FSAQueryInfoType { FSA_QUERY_INFO_JOURNAL_FREE_SPACE_SIZE = 0x7, FSA_QUERY_INFO_FRAGMENT_BLOCK_INFO = 0x8, } FSAQueryInfoType; +WUT_CHECK_SIZE(FSAQueryInfoType, 4); typedef enum FSAReadFlag { FSA_READ_FLAG_NONE = 0x0, FSA_READ_FLAG_READ_WITH_POS = 0x1 } FSAReadFlag; +WUT_CHECK_SIZE(FSAReadFlag, 4); typedef enum FSAWriteFlag { FSA_WRITE_FLAG_NONE = 0x0, FSA_WRITE_FLAG_READ_WITH_POS = 0x1 } FSAWriteFlag; +WUT_CHECK_SIZE(FSAWriteFlag, 4); /** * Process information. @@ -723,7 +727,7 @@ WUT_CHECK_OFFSET(FSAResponse, 0x0, word0); WUT_CHECK_OFFSET(FSAResponse, 0x4, rawOpen); WUT_CHECK_SIZE(FSAResponse, 0x293); -enum FSACommandEnum { +typedef enum FSACommandEnum { FSA_COMMAND_INVALID = 0x0, FSA_COMMAND_MOUNT = 0x1, FSA_COMMAND_UNMOUNT = 0x2, @@ -789,12 +793,14 @@ enum FSACommandEnum { FSA_COMMAND_GET_PROC_RESOURCE_USAGE = 0x8C, FSA_COMMAND_GET_ALL_RESOURCE_USAGE = 0x8D, FSA_COMMAND_SEND_PROFILE_CMD = 0x8E, -}; +} FSACommandEnum; +WUT_CHECK_SIZE(FSACommandEnum, 4); -enum FSAIpcRequestTypeEnum { +typedef enum FSAIpcRequestTypeEnum { FSA_IPC_REQUEST_IOCTL = 0, FSA_IPC_REQUEST_IOCTLV = 1, -}; +} FSAIpcRequestTypeEnum; +WUT_CHECK_SIZE(FSAIpcRequestTypeEnum, 4); struct FSAAsyncResult { //! Queue to put a message on when command is complete. @@ -900,12 +906,14 @@ typedef enum FSAMountFlags { FSA_MOUNT_FLAG_BIND_MOUNT = 1, FSA_MOUNT_FLAG_GLOBAL_MOUNT = 2, } FSAMountFlags; +WUT_CHECK_SIZE(FSAMountFlags, 4); typedef enum FSAUnmountFlags { FSA_UNMOUNT_FLAG_NONE = 0x00000000, FSA_UNMOUNT_FLAG_FORCE = 0x00000002, FSA_UNMOUNT_FLAG_BIND_MOUNT = 0x80000000, } FSAUnmountFlags; +WUT_CHECK_SIZE(FSAUnmountFlags, 4); FSError FSAInit(); diff --git a/include/coreinit/im.h b/include/coreinit/im.h index eba4e3096..cb0dd2999 100644 --- a/include/coreinit/im.h +++ b/include/coreinit/im.h @@ -76,12 +76,14 @@ typedef enum IMParameter IM_PARAMETER_DIM_ENABLE_DRC = 10, IM_PARAMETER_MAX = 11, } IMParameter; +WUT_CHECK_SIZE(IMParameter, 4); typedef enum IMTimer { IM_TIMER_DIM = 0, IM_TIMER_APD = 1, } IMTimer; +WUT_CHECK_SIZE(IMTimer, 4); typedef enum IMEvent { @@ -94,6 +96,7 @@ typedef enum IMEvent IM_EVENT_SYNC = 1 << 7, IM_EVENT_UNK8 = 1 << 8, } IMEvent; +WUT_CHECK_SIZE(IMEvent, 4); IOSHandle IM_Open(void); diff --git a/include/coreinit/interrupts.h b/include/coreinit/interrupts.h index aef43dfa2..d2177423f 100644 --- a/include/coreinit/interrupts.h +++ b/include/coreinit/interrupts.h @@ -28,6 +28,7 @@ typedef enum OSInterruptType OS_INTERRUPT_TYPE_IPCPPC2 = 11, OS_INTERRUPT_TYPE_AHB = 12 } OSInterruptType; +WUT_CHECK_SIZE(OSInterruptType, 4); typedef void(*OSUserInterruptHandler)(OSInterruptType type, OSContext* interruptedContext); diff --git a/include/coreinit/ios.h b/include/coreinit/ios.h index 3716e17f3..c7a2eeda3 100644 --- a/include/coreinit/ios.h +++ b/include/coreinit/ios.h @@ -20,6 +20,7 @@ typedef enum IOSOpenMode IOS_OPEN_WRITE = 1 << 1, IOS_OPEN_READWRITE = IOS_OPEN_READ | IOS_OPEN_WRITE, } IOSOpenMode; +WUT_CHECK_SIZE(IOSOpenMode, 4); typedef enum IOSError { @@ -67,6 +68,7 @@ typedef enum IOSError IOS_ERROR_STALEHANDLE = -41, IOS_ERROR_UNKNOWNVALUE = -42, } IOSError; +WUT_CHECK_SIZE(IOSError, 4); struct IOSVec { diff --git a/include/coreinit/kernel.h b/include/coreinit/kernel.h index b0cdd7d6f..c1755bd10 100644 --- a/include/coreinit/kernel.h +++ b/include/coreinit/kernel.h @@ -29,6 +29,7 @@ typedef enum OSICICommand { OS_ICI_COMMAND_UNKNOWN = 0xE, // Waits for rendezvous, then updates heartbeat OS_ICI_COMMAND_OVERLAY_ARENA = 0xF, } OSICICommand; +WUT_CHECK_SIZE(OSICICommand, 4); typedef void (*OSExceptionCallbackExFn)(OSExceptionType exceptionType, OSContext * interruptedContext, OSContext *cbContext); diff --git a/include/coreinit/mcp.h b/include/coreinit/mcp.h index a8513ad71..3c44815a8 100644 --- a/include/coreinit/mcp.h +++ b/include/coreinit/mcp.h @@ -59,6 +59,7 @@ typedef enum MCPAppType MCP_APP_TYPE_AOC_OVERLAY = 0xD000002C, MCP_APP_TYPE_AMIIBO_SETTINGS = 0xD0000033, } MCPAppType; +WUT_CHECK_SIZE(MCPAppType, 4); typedef enum MCPDeviceFlags { @@ -67,12 +68,14 @@ typedef enum MCPDeviceFlags MCP_DEVICE_FLAG_UNK_4 = 0x4, MCP_DEVICE_FLAG_UNK_8 = 0x8, } MCPDeviceFlags; +WUT_CHECK_SIZE(MCPDeviceFlags, 4); typedef enum MCPInstallTarget { MCP_INSTALL_TARGET_MLC = 0, MCP_INSTALL_TARGET_USB = 1, } MCPInstallTarget; +WUT_CHECK_SIZE(MCPInstallTarget, 4); typedef enum MCPRegion { @@ -83,6 +86,7 @@ typedef enum MCPRegion MCP_REGION_KOREA = 0x20, MCP_REGION_TAIWAN = 0x40, } MCPRegion; +WUT_CHECK_SIZE(MCPRegion, 4); struct WUT_PACKED MCPDevice { diff --git a/include/coreinit/memexpheap.h b/include/coreinit/memexpheap.h index 11da2d2a8..22291605a 100644 --- a/include/coreinit/memexpheap.h +++ b/include/coreinit/memexpheap.h @@ -24,12 +24,14 @@ typedef enum MEMExpHeapMode MEM_EXP_HEAP_MODE_FIRST_FREE = 0, MEM_EXP_HEAP_MODE_NEAREST_SIZE = 1, } MEMExpHeapMode; +WUT_CHECK_SIZE(MEMExpHeapMode, 4); typedef enum MEMExpHeapDirection { MEM_EXP_HEAP_DIR_FROM_TOP = 0, MEM_EXP_HEAP_DIR_FROM_BOTTOM = 1, } MEMExpHeapDirection; +WUT_CHECK_SIZE(MEMExpHeapDirection, 4); struct MEMExpHeapBlock { diff --git a/include/coreinit/memfrmheap.h b/include/coreinit/memfrmheap.h index 731286095..808551dea 100644 --- a/include/coreinit/memfrmheap.h +++ b/include/coreinit/memfrmheap.h @@ -18,6 +18,7 @@ typedef enum MEMFrmHeapFreeMode MEM_FRM_HEAP_FREE_TAIL = 1 << 1, MEM_FRM_HEAP_FREE_ALL = MEM_FRM_HEAP_FREE_HEAD | MEM_FRM_HEAP_FREE_TAIL, } MEMFrmHeapFreeMode; +WUT_CHECK_SIZE(MEMFrmHeapFreeMode, 4); typedef struct MEMFrmHeap MEMFrmHeap; typedef struct MEMFrmHeapState MEMFrmHeapState; diff --git a/include/coreinit/memheap.h b/include/coreinit/memheap.h index 914d3206e..ad4111a3d 100644 --- a/include/coreinit/memheap.h +++ b/include/coreinit/memheap.h @@ -24,6 +24,7 @@ typedef enum MEMBaseHeapType MEM_BASE_HEAP_MEM2 = 1, MEM_BASE_HEAP_FG = 8, } MEMBaseHeapType; +WUT_CHECK_SIZE(MEMBaseHeapType, 4); typedef enum MEMHeapFillType { @@ -31,6 +32,7 @@ typedef enum MEMHeapFillType MEM_HEAP_FILL_TYPE_ALLOCATED = 1, MEM_HEAP_FILL_TYPE_FREED = 2, } MEMHeapFillType; +WUT_CHECK_SIZE(MEMHeapFillType, 4); typedef enum MEMHeapTag { @@ -40,6 +42,7 @@ typedef enum MEMHeapTag MEM_UNIT_HEAP_TAG = 0x554E5448u, MEM_USER_HEAP_TAG = 0x55535248u, } MEMHeapTag; +WUT_CHECK_SIZE(MEMHeapTag, 4); typedef enum MEMHeapFlags { @@ -47,6 +50,7 @@ typedef enum MEMHeapFlags MEM_HEAP_FLAG_DEBUG_MODE = 1 << 1, MEM_HEAP_FLAG_USE_LOCK = 1 << 2, } MEMHeapFlags; +WUT_CHECK_SIZE(MEMHeapFlags, 4); struct MEMHeapHeader { diff --git a/include/coreinit/memory.h b/include/coreinit/memory.h index cc0e047e1..85038afbb 100644 --- a/include/coreinit/memory.h +++ b/include/coreinit/memory.h @@ -17,6 +17,7 @@ typedef enum OSMemoryType OS_MEM1 = 1, OS_MEM2 = 2, } OSMemoryType; +WUT_CHECK_SIZE(OSMemoryType, 4); typedef enum OSSharedDataType { @@ -26,6 +27,7 @@ typedef enum OSSharedDataType OS_SHAREDDATATYPE_FONT_TAIWANESE = 3, OS_SHAREDDATATYPE_FONT_MAX = 4, } OSSharedDataType; +WUT_CHECK_SIZE(OSSharedDataType, 4); BOOL OSGetSharedData(OSSharedDataType type, diff --git a/include/coreinit/memorymap.h b/include/coreinit/memorymap.h index 85eea1886..6621b595a 100644 --- a/include/coreinit/memorymap.h +++ b/include/coreinit/memorymap.h @@ -20,6 +20,7 @@ typedef enum OSMemoryMapMode OS_MAP_MEMORY_FREE = 3, OS_MAP_MEMORY_ALLOCATED = 4, } OSMemoryMapMode; +WUT_CHECK_SIZE(OSMemoryMapMode, 4); #define OS_PAGE_SIZE (128 * 1024) diff --git a/include/coreinit/messagequeue.h b/include/coreinit/messagequeue.h index 0b0c29200..149bb17c5 100644 --- a/include/coreinit/messagequeue.h +++ b/include/coreinit/messagequeue.h @@ -21,6 +21,7 @@ typedef enum OSMessageFlags OS_MESSAGE_FLAGS_BLOCKING = 1 << 0, OS_MESSAGE_FLAGS_HIGH_PRIORITY = 1 << 1, } OSMessageFlags; +WUT_CHECK_SIZE(OSMessageFlags, 4); typedef enum OSFunctionType { @@ -36,6 +37,7 @@ typedef enum OSFunctionType OS_FUNCTION_TYPE_FS_ATTACH_EVENT = 10, OS_FUNCTION_TYPE_FS_STATE_CHANGE_EVENT = 11, } OSFunctionType; +WUT_CHECK_SIZE(OSFunctionType, 4); struct OSMessage { diff --git a/include/coreinit/screen.h b/include/coreinit/screen.h index 421f3c117..4bb5b934b 100644 --- a/include/coreinit/screen.h +++ b/include/coreinit/screen.h @@ -48,6 +48,7 @@ typedef enum OSScreenID //! Represents the screen in the DRC (gamepad). SCREEN_DRC = 1, } OSScreenID; +WUT_CHECK_SIZE(OSScreenID, 4); /** * Initialises the OSScreen library for use. This function must be called before diff --git a/include/coreinit/smd.h b/include/coreinit/smd.h index a6e2c146b..414d2701c 100644 --- a/include/coreinit/smd.h +++ b/include/coreinit/smd.h @@ -33,6 +33,7 @@ typedef enum SmdLockType //! No locking is done SMD_LOCK_TYPE_NONE = 2, } SmdLockType; +WUT_CHECK_SIZE(SmdLockType, 4); typedef enum SmdPpcState { @@ -41,12 +42,14 @@ typedef enum SmdPpcState SMD_PPC_STATE_CLOSED = 2, SMD_PPC_STATE_OPENED = 3, } SmdPpcState; +WUT_CHECK_SIZE(SmdPpcState, 4); typedef enum SmdInterfaceState { SMD_INTERFACE_STATE_OPENED = 0x2222, SMD_INTERFACE_STATE_CLOSED = 0x3333, } SmdInterfaceState; +WUT_CHECK_SIZE(SmdInterfaceState, 4); typedef enum SmdElementType { @@ -54,6 +57,7 @@ typedef enum SmdElementType SMD_ELEMENT_TYPE_VECTOR_SPEC = 1, SMD_ELEMENT_TYPE_VECTOR = 2, } SmdElementType; +WUT_CHECK_SIZE(SmdElementType, 4); struct SmdVectorSpec { diff --git a/include/coreinit/taskqueue.h b/include/coreinit/taskqueue.h index 374cfdd3b..ae42f512e 100644 --- a/include/coreinit/taskqueue.h +++ b/include/coreinit/taskqueue.h @@ -26,6 +26,7 @@ typedef enum MPTaskState MP_TASK_STATE_RUNNING = 1 << 2, MP_TASK_STATE_FINISHED = 1 << 3, } MPTaskState; +WUT_CHECK_SIZE(MPTaskState, 4); typedef enum MPTaskQueueState { @@ -35,6 +36,7 @@ typedef enum MPTaskQueueState MP_TASK_QUEUE_STATE_STOPPED = 1 << 3, MP_TASK_QUEUE_STATE_FINISHED = 1 << 4, } MPTaskQueueState; +WUT_CHECK_SIZE(MPTaskQueueState, 4); #pragma pack(push, 1) struct MPTaskInfo diff --git a/include/coreinit/thread.h b/include/coreinit/thread.h index 1fdb8f895..c0c229e94 100644 --- a/include/coreinit/thread.h +++ b/include/coreinit/thread.h @@ -68,6 +68,7 @@ enum OS_THREAD_STATE //! Thread is about to terminate OS_THREAD_STATE_MORIBUND = 1 << 3, }; +WUT_CHECK_SIZE(enum OS_THREAD_STATE, 4); enum OS_THREAD_REQUEST { @@ -75,6 +76,7 @@ enum OS_THREAD_REQUEST OS_THREAD_REQUEST_SUSPEND = 1, OS_THREAD_REQUEST_CANCEL = 2, }; +WUT_CHECK_SIZE(enum OS_THREAD_REQUEST, 4); enum OS_THREAD_ATTRIB { @@ -98,12 +100,14 @@ enum OS_THREAD_ATTRIB OS_THREAD_ATTRIB_UNKNOWN = 1 << 7 }; +WUT_CHECK_SIZE(enum OS_THREAD_ATTRIB, 4); enum OS_THREAD_TYPE { OS_THREAD_TYPE_DRIVER = 0, OS_THREAD_TYPE_IO = 1, OS_THREAD_TYPE_APP = 2 }; +WUT_CHECK_SIZE(enum OS_THREAD_TYPE, 4); struct OSMutexQueue { diff --git a/include/coreinit/userconfig.h b/include/coreinit/userconfig.h index 358111b92..2fe1e44c8 100644 --- a/include/coreinit/userconfig.h +++ b/include/coreinit/userconfig.h @@ -26,6 +26,7 @@ typedef enum UCCommand UC_CMD_QUERY_SYS_CONFIG = 0x33, UC_CMD_LIST_SYS_CONFIG = 0x34, } UCCommand; +WUT_CHECK_SIZE(UCCommand, 4); typedef enum UCDataType { @@ -40,6 +41,7 @@ typedef enum UCDataType UC_DATATYPE_COMPLEX = 0x08, UC_DATATYPE_INVALID = 0xFF, } UCDataType; +WUT_CHECK_SIZE(UCDataType, 4); typedef enum UCErrors { @@ -82,6 +84,7 @@ typedef enum UCErrors UC_ERROR_FILE_LOCK_NEEDED = -0x200024, UC_ERROR_SYS_PROT = -0x200028, } UCErrors; +WUT_CHECK_SIZE(UCErrors, 4); typedef enum UCFileSys { @@ -90,6 +93,7 @@ typedef enum UCFileSys UC_FILE_SYS_SLC = 0x02, UC_FILE_SYS_RAM = 0x03, } UCFileSys; +WUT_CHECK_SIZE(UCFileSys, 4); #pragma pack(push, 1) struct UCSysConfig diff --git a/include/dmae/mem.h b/include/dmae/mem.h index ec8c0d96f..a56641bc2 100644 --- a/include/dmae/mem.h +++ b/include/dmae/mem.h @@ -24,6 +24,7 @@ typedef enum //! 64 bit memory swapping. DMAE_SWAP_64 = 3, } DMAESwapMode; +WUT_CHECK_SIZE(DMAESwapMode, 4); /** * Starts a DMAE copy operation. diff --git a/include/gx2/debug.h b/include/gx2/debug.h index 91d1c6de6..26924b222 100644 --- a/include/gx2/debug.h +++ b/include/gx2/debug.h @@ -18,6 +18,7 @@ typedef enum GX2DebugCaptureInterfaceVersion { GX2_DEBUG_CAPTURE_INTERFACE_VERSION = 1, } GX2DebugCaptureInterfaceVersion; +WUT_CHECK_SIZE(GX2DebugCaptureInterfaceVersion, 4); //! Options for \link GX2DebugCaptureStart \endlink. typedef enum GX2DebugCaptureStartFlags @@ -28,6 +29,7 @@ typedef enum GX2DebugCaptureStartFlags //! When set \link GX2DebugCaptureStart \endlink will NOT call \link GX2DrawDone \endlink. GX2_DEBUG_CAPTURE_START_FLAGS_DISABLE_GX2DRAWDONE = 1, } GX2DebugCaptureStartFlags; +WUT_CHECK_SIZE(GX2DebugCaptureStartFlags, 4); //! Options for \link GX2DebugCaptureEnd \endlink. typedef enum GX2DebugCaptureEndFlags @@ -38,6 +40,7 @@ typedef enum GX2DebugCaptureEndFlags //! When set \link GX2DebugCaptureEnd \endlink will NOT call \link GX2Flush \endlink. GX2_DEBUG_CAPTURE_END_FLAGS_DISABLE_GX2FLUSH = 1, } GX2DebugCaptureEndFlags; +WUT_CHECK_SIZE(GX2DebugCaptureEndFlags, 4); struct GX2DebugCaptureInterface { diff --git a/include/gx2/enum.h b/include/gx2/enum.h index e1172f590..805c04cbb 100644 --- a/include/gx2/enum.h +++ b/include/gx2/enum.h @@ -31,6 +31,7 @@ typedef enum GX2AAMode GX2_AA_MODE2X = 1, GX2_AA_MODE4X = 2 } GX2AAMode; +WUT_CHECK_SIZE(GX2AAMode, 4); typedef enum GX2AlphaToMaskMode { @@ -40,6 +41,7 @@ typedef enum GX2AlphaToMaskMode GX2_ALPHA_TO_MASK_MODE_DITHER_180 = 3, GX2_ALPHA_TO_MASK_MODE_DITHER_270 = 4, } GX2AlphaToMaskMode; +WUT_CHECK_SIZE(GX2AlphaToMaskMode, 4); typedef enum GX2AttribFormat { @@ -90,6 +92,7 @@ typedef enum GX2AttribFormat GX2_ATTRIB_FORMAT_FLOAT_32_32_32 = GX2_ATTRIB_FLAG_SCALED | GX2_ATTRIB_TYPE_32_32_32_FLOAT, GX2_ATTRIB_FORMAT_FLOAT_32_32_32_32 = GX2_ATTRIB_FLAG_SCALED | GX2_ATTRIB_TYPE_32_32_32_32_FLOAT, } GX2AttribFormat; +WUT_CHECK_SIZE(GX2AttribFormat, 4); WUT_ENUM_BITMASK_TYPE(GX2AttribFormat) @@ -98,6 +101,7 @@ typedef enum GX2AttribIndexType GX2_ATTRIB_INDEX_PER_VERTEX = 0, GX2_ATTRIB_INDEX_PER_INSTANCE = 1, } GX2AttribIndexType; +WUT_CHECK_SIZE(GX2AttribIndexType, 4); typedef enum GX2BlendMode { @@ -121,6 +125,7 @@ typedef enum GX2BlendMode GX2_BLEND_MODE_SRC1_ALPHA = 17, GX2_BLEND_MODE_INV_SRC1_ALPHA = 18, } GX2BlendMode; +WUT_CHECK_SIZE(GX2BlendMode, 4); typedef enum GX2BlendCombineMode { @@ -130,6 +135,7 @@ typedef enum GX2BlendCombineMode GX2_BLEND_COMBINE_MODE_MAX = 3, GX2_BLEND_COMBINE_MODE_REV_SUB = 4, } GX2BlendCombineMode; +WUT_CHECK_SIZE(GX2BlendCombineMode, 4); typedef enum GX2BufferingMode { @@ -137,6 +143,7 @@ typedef enum GX2BufferingMode GX2_BUFFERING_MODE_DOUBLE = 2, GX2_BUFFERING_MODE_TRIPLE = 3, } GX2BufferingMode; +WUT_CHECK_SIZE(GX2BufferingMode, 4); typedef enum GX2ChannelMask { @@ -156,6 +163,7 @@ typedef enum GX2ChannelMask GX2_CHANNEL_MASK_GBA = 14, GX2_CHANNEL_MASK_RGBA = 15, } GX2ChannelMask; +WUT_CHECK_SIZE(GX2ChannelMask, 4); typedef enum GX2ClearFlags { @@ -163,6 +171,7 @@ typedef enum GX2ClearFlags GX2_CLEAR_FLAGS_STENCIL = 2, GX2_CLEAR_FLAGS_BOTH = (GX2_CLEAR_FLAGS_DEPTH | GX2_CLEAR_FLAGS_STENCIL), } GX2ClearFlags; +WUT_CHECK_SIZE(GX2ClearFlags, 4); typedef enum GX2CompareFunction { @@ -175,6 +184,7 @@ typedef enum GX2CompareFunction GX2_COMPARE_FUNC_GEQUAL = 6, GX2_COMPARE_FUNC_ALWAYS = 7, } GX2CompareFunction; +WUT_CHECK_SIZE(GX2CompareFunction, 4); typedef enum GX2DrcRenderMode { @@ -182,6 +192,7 @@ typedef enum GX2DrcRenderMode GX2_DRC_RENDER_MODE_SINGLE = 1, GX2_DRC_RENDER_MODE_DOUBLE = 2, } GX2DrcRenderMode; +WUT_CHECK_SIZE(GX2DrcRenderMode, 4); typedef enum GX2EventType { @@ -191,6 +202,7 @@ typedef enum GX2EventType GX2_EVENT_TYPE_FLIP = 3, GX2_EVENT_TYPE_DISPLAY_LIST_OVERRUN = 4, } GX2EventType; +WUT_CHECK_SIZE(GX2EventType, 4); typedef enum GX2EndianSwapMode { @@ -199,6 +211,7 @@ typedef enum GX2EndianSwapMode GX2_ENDIAN_SWAP_8_IN_32 = 2, GX2_ENDIAN_SWAP_DEFAULT = 3, } GX2EndianSwapMode; +WUT_CHECK_SIZE(GX2EndianSwapMode, 4); typedef enum GX2FetchShaderType { @@ -207,12 +220,14 @@ typedef enum GX2FetchShaderType GX2_FETCH_SHADER_TESSELLATION_TRIANGLE = 2, GX2_FETCH_SHADER_TESSELLATION_QUAD = 3, } GX2FetchShaderType; +WUT_CHECK_SIZE(GX2FetchShaderType, 4); typedef enum GX2FrontFace { GX2_FRONT_FACE_CCW = 0, GX2_FRONT_FACE_CW = 1, } GX2FrontFace; +WUT_CHECK_SIZE(GX2FrontFace, 4); typedef enum GX2IndexType { @@ -221,6 +236,7 @@ typedef enum GX2IndexType GX2_INDEX_TYPE_U16 = 4, GX2_INDEX_TYPE_U32 = 9, } GX2IndexType; +WUT_CHECK_SIZE(GX2IndexType, 4); typedef enum GX2InvalidateMode { @@ -238,6 +254,7 @@ typedef enum GX2InvalidateMode GX2_INVALIDATE_MODE_CPU_TEXTURE = GX2_INVALIDATE_MODE_CPU | GX2_INVALIDATE_MODE_TEXTURE, GX2_INVALIDATE_MODE_CPU_SHADER = GX2_INVALIDATE_MODE_CPU | GX2_INVALIDATE_MODE_SHADER, } GX2InvalidateMode; +WUT_CHECK_SIZE(GX2InvalidateMode, 4); WUT_ENUM_BITMASK_TYPE(GX2InvalidateMode) @@ -252,6 +269,7 @@ typedef enum GX2InitAttributes GX2_INIT_TOSS_STAGE = 10, GX2_INIT_APP_IO_THREAD_STACK_SIZE = 11, } GX2InitAttributes; +WUT_CHECK_SIZE(GX2InitAttributes, 4); typedef enum GX2LogicOp { @@ -272,6 +290,7 @@ typedef enum GX2LogicOp GX2_LOGIC_OP_OR = 0xEE, GX2_LOGIC_OP_SET = 0xFF, } GX2LogicOp; +WUT_CHECK_SIZE(GX2LogicOp, 4); typedef enum GX2PrimitiveMode { @@ -290,6 +309,7 @@ typedef enum GX2PrimitiveMode GX2_PRIMITIVE_MODE_QUADS = 19, GX2_PRIMITIVE_MODE_QUAD_STRIP = 20, } GX2PrimitiveMode; +WUT_CHECK_SIZE(GX2PrimitiveMode, 4); typedef enum GX2PolygonMode { @@ -297,6 +317,7 @@ typedef enum GX2PolygonMode GX2_POLYGON_MODE_LINE = 1, GX2_POLYGON_MODE_TRIANGLE = 2, } GX2PolygonMode; +WUT_CHECK_SIZE(GX2PolygonMode, 4); typedef enum GX2RenderTarget { @@ -309,12 +330,14 @@ typedef enum GX2RenderTarget GX2_RENDER_TARGET_6 = 6, GX2_RENDER_TARGET_7 = 7, } GX2RenderTarget; +WUT_CHECK_SIZE(GX2RenderTarget, 4); typedef enum GX2RoundingMode { GX2_ROUNDING_MODE_ROUND_TO_EVEN = 0, GX2_ROUNDING_MODE_TRUNCATE = 1, } GX2RoundingMode; +WUT_CHECK_SIZE(GX2RoundingMode, 4); typedef enum GX2SamplerVarType { @@ -323,6 +346,7 @@ typedef enum GX2SamplerVarType GX2_SAMPLER_VAR_TYPE_SAMPLER_3D = 3, GX2_SAMPLER_VAR_TYPE_SAMPLER_CUBE = 4, } GX2SamplerVarType; +WUT_CHECK_SIZE(GX2SamplerVarType, 4); typedef enum GX2ScanTarget { @@ -333,6 +357,7 @@ typedef enum GX2ScanTarget GX2_SCAN_TARGET_TV = GX2_SCAN_TARGET_TV0, GX2_SCAN_TARGET_DRC = GX2_SCAN_TARGET_DRC0, } GX2ScanTarget; +WUT_CHECK_SIZE(GX2ScanTarget, 4); typedef enum GX2ShaderMode { @@ -341,6 +366,7 @@ typedef enum GX2ShaderMode GX2_SHADER_MODE_GEOMETRY_SHADER = 2, GX2_SHADER_MODE_COMPUTE_SHADER = 3, } GX2ShaderMode; +WUT_CHECK_SIZE(GX2ShaderMode, 4); typedef enum GX2ShaderVarType { @@ -384,6 +410,7 @@ typedef enum GX2ShaderVarType GX2_SHADER_VAR_TYPE_DOUBLE4X3 = 37, GX2_SHADER_VAR_TYPE_DOUBLE4X4 = 38, } GX2ShaderVarType; +WUT_CHECK_SIZE(GX2ShaderVarType, 4); typedef enum GX2StencilFunction { @@ -396,6 +423,7 @@ typedef enum GX2StencilFunction GX2_STENCIL_FUNCTION_INCR_WRAP = 6, GX2_STENCIL_FUNCTION_DECR_WRAP = 7, } GX2StencilFunction; +WUT_CHECK_SIZE(GX2StencilFunction, 4); typedef enum GX2SurfaceDim { @@ -408,6 +436,7 @@ typedef enum GX2SurfaceDim GX2_SURFACE_DIM_TEXTURE_2D_MSAA = 6, GX2_SURFACE_DIM_TEXTURE_2D_MSAA_ARRAY = 7, } GX2SurfaceDim; +WUT_CHECK_SIZE(GX2SurfaceDim, 4); typedef enum GX2SurfaceFormat { @@ -483,6 +512,7 @@ typedef enum GX2SurfaceFormat GX2_SURFACE_FORMAT_FLOAT_D24_S8 = 0x811, GX2_SURFACE_FORMAT_FLOAT_X8_X24 = 0x81c, } GX2SurfaceFormat; +WUT_CHECK_SIZE(GX2SurfaceFormat, 4); typedef enum GX2SurfaceUse { @@ -494,6 +524,7 @@ typedef enum GX2SurfaceUse GX2_SURFACE_USE_TV = 1 << 31, GX2_SURFACE_USE_TEXTURE_COLOR_BUFFER_TV = (GX2_SURFACE_USE_TEXTURE | GX2_SURFACE_USE_COLOR_BUFFER | GX2_SURFACE_USE_TV) } GX2SurfaceUse; +WUT_CHECK_SIZE(GX2SurfaceUse, 4); WUT_ENUM_BITMASK_TYPE(GX2SurfaceUse) @@ -503,6 +534,7 @@ typedef enum GX2TessellationMode GX2_TESSELLATION_MODE_CONTINUOUS = 1, GX2_TESSELLATION_MODE_ADAPTIVE = 2, } GX2TessellationMode; +WUT_CHECK_SIZE(GX2TessellationMode, 4); typedef enum GX2TexBorderType { @@ -511,6 +543,7 @@ typedef enum GX2TexBorderType GX2_TEX_BORDER_TYPE_WHITE = 2, GX2_TEX_BORDER_TYPE_VARIABLE = 3, } GX2TexBorderType; +WUT_CHECK_SIZE(GX2TexBorderType, 4); typedef enum GX2TexClampMode { @@ -520,6 +553,7 @@ typedef enum GX2TexClampMode GX2_TEX_CLAMP_MODE_MIRROR_ONCE = 3, GX2_TEX_CLAMP_MODE_CLAMP_BORDER = 6, } GX2TexClampMode; +WUT_CHECK_SIZE(GX2TexClampMode, 4); typedef enum GX2TexMipFilterMode { @@ -527,22 +561,26 @@ typedef enum GX2TexMipFilterMode GX2_TEX_MIP_FILTER_MODE_POINT = 1, GX2_TEX_MIP_FILTER_MODE_LINEAR = 2, } GX2TexMipFilterMode; +WUT_CHECK_SIZE(GX2TexMipFilterMode, 4); typedef enum GX2TexMipPerfMode { GX2_TEX_MIP_PERF_MODE_DISABLE = 0, } GX2TexMipPerfMode; +WUT_CHECK_SIZE(GX2TexMipPerfMode, 4); typedef enum GX2TexXYFilterMode { GX2_TEX_XY_FILTER_MODE_POINT = 0, GX2_TEX_XY_FILTER_MODE_LINEAR = 1, } GX2TexXYFilterMode; +WUT_CHECK_SIZE(GX2TexXYFilterMode, 4); typedef enum GX2TexAnisoRatio { GX2_TEX_ANISO_RATIO_NONE = 0, } GX2TexAnisoRatio; +WUT_CHECK_SIZE(GX2TexAnisoRatio, 4); typedef enum GX2TexZFilterMode { @@ -550,11 +588,13 @@ typedef enum GX2TexZFilterMode GX2_TEX_Z_FILTER_MODE_POINT = 1, GX2_TEX_Z_FILTER_MODE_LINEAR = 2, } GX2TexZFilterMode; +WUT_CHECK_SIZE(GX2TexZFilterMode, 4); typedef enum GX2TexZPerfMode { GX2_TEX_Z_PERF_MODE_DISABLED = 0, } GX2TexZPerfMode; +WUT_CHECK_SIZE(GX2TexZPerfMode, 4); typedef enum GX2TileMode { @@ -576,6 +616,7 @@ typedef enum GX2TileMode GX2_TILE_MODE_TILED_3B_THICK = 15, GX2_TILE_MODE_LINEAR_SPECIAL = 16, } GX2TileMode; +WUT_CHECK_SIZE(GX2TileMode, 4); typedef enum GX2TVRenderMode { @@ -585,6 +626,7 @@ typedef enum GX2TVRenderMode GX2_TV_RENDER_MODE_WIDE_720P = 3, GX2_TV_RENDER_MODE_WIDE_1080P = 5, } GX2TVRenderMode; +WUT_CHECK_SIZE(GX2TVRenderMode, 4); typedef enum GX2TVScanMode { @@ -596,6 +638,7 @@ typedef enum GX2TVScanMode GX2_TV_SCAN_MODE_1080I = 6, GX2_TV_SCAN_MODE_1080P = 7, } GX2TVScanMode; +WUT_CHECK_SIZE(GX2TVScanMode, 4); #ifdef __cplusplus } diff --git a/include/gx2/utils.h b/include/gx2/utils.h index adc2f23ae..121bf9088 100644 --- a/include/gx2/utils.h +++ b/include/gx2/utils.h @@ -27,6 +27,7 @@ typedef enum GX2_SQ_SEL GX2_SQ_SEL_1 = 5, GX2_SQ_SEL_MASK = 7, } GX2_SQ_SEL; +WUT_CHECK_SIZE(GX2_SQ_SEL, 4); #define GX2_SEL_MASK(x, y, z, w) (((x) << 24) | ((y) << 16) | ((z) << 8) | (w)) #define GX2_COMP_MAP(x, y, z, w) (((x) << 24) | ((y) << 16) | ((z) << 8) | (w)) diff --git a/include/gx2r/resource.h b/include/gx2r/resource.h index 83855a9ca..388291802 100644 --- a/include/gx2r/resource.h +++ b/include/gx2r/resource.h @@ -88,6 +88,7 @@ typedef enum GX2RResourceFlags //! Resource is locked for all access GX2R_RESOURCE_LOCKED = 1 << 30, } GX2RResourceFlags; +WUT_CHECK_SIZE(GX2RResourceFlags, 4); WUT_ENUM_BITMASK_TYPE(GX2RResourceFlags) diff --git a/include/h264/decode.h b/include/h264/decode.h index e59d57fdc..648029c44 100644 --- a/include/h264/decode.h +++ b/include/h264/decode.h @@ -28,6 +28,7 @@ typedef enum H264Parameter //! Set a user memory pointer which is passed to the frame output callback. H264_PARAMETER_USER_MEMORY = 0x70000001, } H264Parameter; +WUT_CHECK_SIZE(H264Parameter, 4); /** diff --git a/include/h264/stream.h b/include/h264/stream.h index 2bee3be94..db415cb76 100644 --- a/include/h264/stream.h +++ b/include/h264/stream.h @@ -45,6 +45,7 @@ typedef enum H264Error //! main (77) and high (100) profiles are allowed. H264_ERROR_INVALID_PROFILE = 0x1080000, } H264Error; +WUT_CHECK_SIZE(H264Error, 4); struct WUT_PACKED H264DecodedVuiParameters { diff --git a/include/mic/mic.h b/include/mic/mic.h index 1a56fe374..843a5b922 100644 --- a/include/mic/mic.h +++ b/include/mic/mic.h @@ -25,12 +25,14 @@ typedef enum MICError MIC_ERROR_ALREADY_CLOSED = -7, MIC_ERROR_INVALID_INSTANCE = -8, } MICError; +WUT_CHECK_SIZE(MICError, 4); typedef enum MICInstance { MIC_INSTANCE_0 = 0, MIC_INSTANCE_1 = 1 } MICInstance; +WUT_CHECK_SIZE(MICInstance, 4); struct MICWorkMemory { diff --git a/include/nn/ccr/sys.h b/include/nn/ccr/sys.h index 621d01395..e968b1f2a 100644 --- a/include/nn/ccr/sys.h +++ b/include/nn/ccr/sys.h @@ -21,6 +21,7 @@ typedef enum CCRSysPairingState //! Pairing timed out CCR_SYS_PAIRING_TIMED_OUT = 2, } CCRSysPairingState; +WUT_CHECK_SIZE(CCRSysPairingState, 4); void CCRSysInit(void); diff --git a/include/nn/cmpt/cmpt.h b/include/nn/cmpt/cmpt.h index 8c8c37f86..56cd7f6e0 100644 --- a/include/nn/cmpt/cmpt.h +++ b/include/nn/cmpt/cmpt.h @@ -17,6 +17,7 @@ typedef enum CmptScreenType { CMPT_SCREEN_TYPE_DRC, CMPT_SCREEN_TYPE_BOTH, } CmptScreenType; +WUT_CHECK_SIZE(CmptScreenType, 4); /** * Gets the required size which needs to be allocated for the "dataBuffer". diff --git a/include/nn/ffl/miidata.h b/include/nn/ffl/miidata.h index 0632089ab..109735e88 100644 --- a/include/nn/ffl/miidata.h +++ b/include/nn/ffl/miidata.h @@ -19,6 +19,7 @@ typedef enum FFLCreateIDFlags { FFL_CREATE_ID_FLAG_TEMPORARY = 0x2, FFL_CREATE_ID_FLAG_NORMAL = 0x8, } FFLCreateIDFlags; +WUT_CHECK_SIZE(FFLCreateIDFlags, 4); typedef struct WUT_PACKED FFLCreateID { FFLCreateIDFlags flags : 4; diff --git a/include/nn/save/save.h b/include/nn/save/save.h index 99c6fe19b..a13689017 100644 --- a/include/nn/save/save.h +++ b/include/nn/save/save.h @@ -14,6 +14,7 @@ typedef enum SAVEStatus SAVE_STATUS_NOT_FOUND = -6, SAVE_STATUS_STORAGE_FULL = -12, } SAVEStatus; +WUT_CHECK_SIZE(SAVEStatus, 4); SAVEStatus SAVEInit(); diff --git a/include/nn/temp/temp.h b/include/nn/temp/temp.h index da3615334..6be09fd26 100644 --- a/include/nn/temp/temp.h +++ b/include/nn/temp/temp.h @@ -12,6 +12,7 @@ typedef enum TEMPTargetPreference TEMP_PREF_DEFAULT = 0, TEMP_PREF_INTERNAL_STORAGE = 1, } TEMPTargetPreference; +WUT_CHECK_SIZE(TEMPTargetPreference, 4); typedef uint64_t TEMPDirId; diff --git a/include/nsysccr/cdc.h b/include/nsysccr/cdc.h index 7510960b8..b70e8dc99 100644 --- a/include/nsysccr/cdc.h +++ b/include/nsysccr/cdc.h @@ -27,6 +27,7 @@ typedef enum CCRCDCDestinationEnum CCR_CDC_DESTINATION_DRC0 = 2, CCR_CDC_DESTINATION_DRC1 = 3, } CCRCDCDestinationEnum; +WUT_CHECK_SIZE(CCRCDCDestinationEnum, 4); typedef enum CCRCDCWpsStatusEnum { @@ -34,6 +35,7 @@ typedef enum CCRCDCWpsStatusEnum CCR_CDC_WPS_STATUS_SEARCHING = 1, CCR_CDC_WPS_STATUS_PAIRING = 2, } CCRCDCWpsStatusEnum; +WUT_CHECK_SIZE(CCRCDCWpsStatusEnum, 4); typedef enum CCRCDCDrcStateEnum { @@ -46,6 +48,7 @@ typedef enum CCRCDCDrcStateEnum CCR_CDC_DRC_STATE_UNK12 = 12, CCR_CDC_DRC_STATE_UNK15 = 15, } CCRCDCDrcStateEnum; +WUT_CHECK_SIZE(CCRCDCDrcStateEnum, 4); struct WUT_PACKED CCRCDCMacAddress { diff --git a/include/nsyshid/hid.h b/include/nsyshid/hid.h index c0567ddcf..e7ca2e962 100644 --- a/include/nsyshid/hid.h +++ b/include/nsyshid/hid.h @@ -18,6 +18,7 @@ typedef enum HIDAttachEvent HID_DEVICE_DETACH = 0, HID_DEVICE_ATTACH = 1, } HIDAttachEvent; +WUT_CHECK_SIZE(HIDAttachEvent, 4); typedef int32_t (*HIDAttachCallback)(HIDClient *client, diff --git a/include/nsyskbd/nsyskbd.h b/include/nsyskbd/nsyskbd.h index b49194b44..cc31d6990 100644 --- a/include/nsyskbd/nsyskbd.h +++ b/include/nsyskbd/nsyskbd.h @@ -53,6 +53,7 @@ typedef enum KDBCountry { KDB_COUNTRY_UNKNOWN_17 = 17, KDB_COUNTRY_UNKNOWN_18 = 18, } KDBCountry; +WUT_CHECK_SIZE(KDBCountry, 4); typedef enum KDBError { KDB_ERROR_NONE = 0, @@ -60,6 +61,7 @@ typedef enum KDBError { KDB_ERROR_ALREADY_INITIALIZED = 3, KDB_ERROR_INVALID_COUNTRY = 4, } KDBError; +WUT_CHECK_SIZE(KDBError, 4); KDBError KBDInit(uint32_t unused, diff --git a/include/nsysnet/netconfig.h b/include/nsysnet/netconfig.h index 6a5898b0e..8bcfed509 100644 --- a/include/nsysnet/netconfig.h +++ b/include/nsysnet/netconfig.h @@ -48,26 +48,31 @@ typedef enum NetConfInterfaceTypeEnum { NET_CONF_INTERFACE_TYPE_WIFI = 0, NET_CONF_INTERFACE_TYPE_ETHERNET = 1, } NetConfInterfaceTypeEnum; +WUT_CHECK_SIZE(NetConfInterfaceTypeEnum, 4); typedef enum NetConfEthCfgSpeedEnum { NET_CONF_ETH_CFG_SPEED_10M = 10, NET_CONF_ETH_CFG_SPEED_100M = 100, } NetConfEthCfgSpeedEnum; +WUT_CHECK_SIZE(NetConfEthCfgSpeedEnum, 4); typedef enum NetConfEthCfgDuplexEnum { NET_CONF_ETH_CFG_DUPLEX_HALF = 1, NET_CONF_ETH_CFG_DUPLEX_FULL = 2, } NetConfEthCfgDuplexEnum; +WUT_CHECK_SIZE(NetConfEthCfgDuplexEnum, 4); typedef enum NetConfEthCfgNegotiationEnum { NET_CONF_ETH_CFG_NEGOTIATION_MANUAL = 1, NET_CONF_ETH_CFG_NEGOTIATION_AUTO = 2, } NetConfEthCfgNegotiationEnum; +WUT_CHECK_SIZE(NetConfEthCfgNegotiationEnum, 4); typedef enum NetConfIPv4Mode { NET_CONF_IPV4_MODE_DHCP = 0, NET_CONF_IPV4_MODE_MANUAL = 2, } NetConfIPv4Mode; +WUT_CHECK_SIZE(NetConfIPv4Mode, 4); typedef enum NetConfWifiPrivacyModeEnum { NET_CONF_WIFI_PRIVACY_MODE_NONE = 0, @@ -77,32 +82,38 @@ typedef enum NetConfWifiPrivacyModeEnum { NET_CONF_WIFI_PRIVACY_MODE_WPA2_PSK_AES = 5, NET_CONF_WIFI_PRIVACY_MODE_WPA_PSK_AES = 6, } NetConfWifiPrivacyModeEnum; +WUT_CHECK_SIZE(NetConfWifiPrivacyModeEnum, 4); typedef enum NetConfProxyAuthTypeEnum { NET_CONF_PROXY_AUTH_TYPE_NONE = 0, NET_CONF_PROXY_AUTH_TYPE_BASIC_AUTHENTICATION = 1, } NetConfProxyAuthTypeEnum; +WUT_CHECK_SIZE(NetConfProxyAuthTypeEnum, 4); typedef enum NetConfProxyStatusEnum { NET_CONF_PROXY_DISABLED = 0, NET_CONF_PROXY_ENABLED = 1, } NetConfProxyStatusEnum; +WUT_CHECK_SIZE(NetConfProxyStatusEnum, 4); typedef enum NetConfLinkStateEnum { NET_CONF_LINK_STATE_UP = 1, NET_CONF_LINK_STATE_DOWN = 2, NET_CONF_LINK_STATE_NEGOTIATE = 3, } NetConfLinkStateEnum; +WUT_CHECK_SIZE(NetConfLinkStateEnum, 4); typedef enum NetConfOperStateEnum { NET_CONF_OPER_STATE_UP = 1, NET_CONF_OPER_STATE_DOWN = 2, } NetConfOperStateEnum; +WUT_CHECK_SIZE(NetConfOperStateEnum, 4); typedef enum NetConfAdminStateEnum { NET_CONF_ADMIN_STATE_UP = 1, NET_CONF_ADMIN_STATE_DOWN = 2, } NetConfAdminStateEnum; +WUT_CHECK_SIZE(NetConfAdminStateEnum, 4); typedef enum NetConfProfile { NET_CONF_PROFILE_0 = 0, @@ -112,6 +123,7 @@ typedef enum NetConfProfile { NET_CONF_PROFILE_4 = 4, NET_CONF_PROFILE_5 = 5, } NetConfProfile; +WUT_CHECK_SIZE(NetConfProfile, 4); struct NetConfAllProfileState { WUT_UNKNOWN_BYTES(0x18); diff --git a/include/nsysnet/nssl.h b/include/nsysnet/nssl.h index ebc6eaacb..b29d37471 100644 --- a/include/nsysnet/nssl.h +++ b/include/nsysnet/nssl.h @@ -88,6 +88,7 @@ typedef enum NSSLErrors NSSL_ERROR_INVALID_CERT_SIZE = -0x280030, NSSL_ERROR_INVALID_KEY_SIZE = -0x280031, } NSSLErrors; +WUT_CHECK_SIZE(NSSLErrors, 4); /** * The IDs of a system CA. These certificates are built-in to the system and can @@ -240,6 +241,7 @@ typedef enum NSSLServerCertId //! Represents the last certificate in the 4096-bit commercial CA group. NSSL_SERVER_CERT_GROUP_COMMERCIAL_4096_LAST = 1901, } NSSLServerCertId; +WUT_CHECK_SIZE(NSSLServerCertId, 4); /** * Initialises the NSSL library for use. This must be called before any other diff --git a/include/nsysuhs/uhs.h b/include/nsysuhs/uhs.h index 28d977a8c..1c8aabfba 100644 --- a/include/nsysuhs/uhs.h +++ b/include/nsysuhs/uhs.h @@ -31,6 +31,7 @@ typedef enum UHSStatus UHS_STATUS_HANDLE_INVALID_ARGS = 0xffdefffd, UHS_STATUS_HANDLE_INVALID_STATE = 0xffdefffc, } UHSStatus; +WUT_CHECK_SIZE(UHSStatus, 4); typedef enum UHSHandleState { @@ -41,6 +42,7 @@ typedef enum UHSHandleState UHS_HANDLE_STATE_CLOSED = 0x04, UHS_HANDLE_STATE_ERROR = 0x05, } UHSHandleState; +WUT_CHECK_SIZE(UHSHandleState, 4); #define UHS_CONFIG_BUFFER_SIZE 0x137f @@ -150,6 +152,7 @@ typedef enum UHSAdminDevType UHS_ADMIN_DEV_RESUME = 0x04, UHS_ADMIN_DEV_DESTROY = 0x05, } UHSAdminDevType; +WUT_CHECK_SIZE(UHSAdminDevType, 4); typedef enum UHSAdminEpType { @@ -158,6 +161,7 @@ typedef enum UHSAdminEpType UHS_ADMIN_EP_CANCEL = 0x03, UHS_ADMIN_EP_CANCEL_RESET = 0x04, } UHSAdminEpType; +WUT_CHECK_SIZE(UHSAdminEpType, 4); /* Open a specific controller under /dev/uhs */ UHSStatus diff --git a/include/padscore/kpad.h b/include/padscore/kpad.h index 832b86fa1..150dbb47c 100644 --- a/include/padscore/kpad.h +++ b/include/padscore/kpad.h @@ -41,6 +41,7 @@ typedef enum KPADError //! KPAD is uninitialized, need to call KPADInit() KPAD_ERROR_UNINITIALIZED = -5, } KPADError; +WUT_CHECK_SIZE(KPADError, 4); //! 2D vector. struct KPADVec2D diff --git a/include/padscore/wpad.h b/include/padscore/wpad.h index 754c5c599..4758a550b 100644 --- a/include/padscore/wpad.h +++ b/include/padscore/wpad.h @@ -28,12 +28,14 @@ typedef enum WPADChan //! Channel 3. WPAD_CHAN_3 = 3, } WPADChan; +WUT_CHECK_SIZE(WPADChan, 4); //! Data format. typedef enum WPADDataFormat { WPAD_FMT_PRO_CONTROLLER = 22, } WPADDataFormat; +WUT_CHECK_SIZE(WPADDataFormat, 4); //! Extension type. typedef enum WPADExtensionType @@ -53,6 +55,7 @@ typedef enum WPADExtensionType //! Pro Controller. WPAD_EXT_PRO_CONTROLLER = 31, } WPADExtensionType; +WUT_CHECK_SIZE(WPADExtensionType, 4); //! Wii Remote buttons. typedef enum WPADButton @@ -84,6 +87,7 @@ typedef enum WPADButton //! The HOME button. WPAD_BUTTON_HOME = 0x8000, } WPADButton; +WUT_CHECK_SIZE(WPADButton, 4); //! Nunchuk buttons. typedef enum WPADNunchukButton @@ -101,6 +105,7 @@ typedef enum WPADNunchukButton //! The C button. WPAD_NUNCHUK_BUTTON_C = 0x4000, } WPADNunchukButton; +WUT_CHECK_SIZE(WPADNunchukButton, 4); //! Classic Controller buttons. typedef enum WPADClassicButton @@ -152,6 +157,7 @@ typedef enum WPADClassicButton //! The emulated up button on the right stick. WPAD_CLASSIC_STICK_R_EMULATION_UP = 0x00800000, } WPADClassicButton; +WUT_CHECK_SIZE(WPADClassicButton, 4); //! Pro Controller buttons. typedef enum WPADProButton @@ -209,6 +215,7 @@ typedef enum WPADProButton //! The emulated right button on the right stick. WPAD_PRO_STICK_R_EMULATION_RIGHT = 0x00800000, } WPADProButton; +WUT_CHECK_SIZE(WPADProButton, 4); //! 2D vector. struct WPADVec2D diff --git a/include/proc_ui/procui.h b/include/proc_ui/procui.h index af5f83ba9..441b86457 100644 --- a/include/proc_ui/procui.h +++ b/include/proc_ui/procui.h @@ -71,6 +71,7 @@ typedef enum ProcUICallbackType //! The user attempted to press the HOME button but was denied PROCUI_CALLBACK_HOME_BUTTON_DENIED, } ProcUICallbackType; +WUT_CHECK_SIZE(ProcUICallbackType, 4); typedef enum ProcUIStatus { @@ -83,6 +84,7 @@ typedef enum ProcUIStatus //! The application must release all resources (including ProcUI) and quit PROCUI_STATUS_EXITING, } ProcUIStatus; +WUT_CHECK_SIZE(ProcUIStatus, 4); /** * Unregister all ProcUI callbacks. diff --git a/include/sndcore2/core.h b/include/sndcore2/core.h index 91b412a80..1b2bf8bc7 100644 --- a/include/sndcore2/core.h +++ b/include/sndcore2/core.h @@ -31,12 +31,14 @@ enum AX_INIT_RENDERER AX_INIT_RENDERER_32KHZ = 0, AX_INIT_RENDERER_48KHZ = 1, }; +WUT_CHECK_SIZE(enum AX_INIT_RENDERER, 4); enum AX_INIT_PIPELINE { AX_INIT_PIPELINE_SINGLE = 0, AX_INIT_PIPELINE_FOUR_STAGE = 1, }; +WUT_CHECK_SIZE(enum AX_INIT_PIPELINE, 4); struct AXProfile { diff --git a/include/sndcore2/device.h b/include/sndcore2/device.h index 14817d98b..8e16b73a6 100644 --- a/include/sndcore2/device.h +++ b/include/sndcore2/device.h @@ -27,6 +27,7 @@ enum AX_DEVICE_MODE // Unknown AX_DEVICE_MODE_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DEVICE_MODE, 4); enum AX_DEVICE_TYPE { @@ -34,6 +35,7 @@ enum AX_DEVICE_TYPE AX_DEVICE_TYPE_DRC = 1, AX_DEVICE_TYPE_CONTROLLER = 2, }; +WUT_CHECK_SIZE(enum AX_DEVICE_TYPE, 4); AXResult AXGetDeviceMode(AXDeviceType type, diff --git a/include/sndcore2/drcvs.h b/include/sndcore2/drcvs.h index 8577e542f..ac22593b9 100644 --- a/include/sndcore2/drcvs.h +++ b/include/sndcore2/drcvs.h @@ -33,30 +33,35 @@ enum AX_DRC_VS_MODE // Unknown AX_DRC_VS_MODE_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DRC_VS_MODE, 4); enum AX_DRC_VS_OUTPUT { // Unknown AX_DRC_VS_OUTPUT_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DRC_VS_OUTPUT, 4); enum AX_DRC_VS_LC { // Unknown AX_DRC_VS_LC_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DRC_VS_LC, 4); enum AX_DRC_VS_SPEAKER_POS { // Unknown AX_DRC_VS_SPEAKER_POS_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DRC_VS_SPEAKER_POS, 4); enum AX_DRC_VS_SURROUND_GAIN { // Unknown AX_DRC_VS_SURROUND_GAIN_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_DRC_VS_SURROUND_GAIN, 4); AXResult AXGetDRCVSMode(AXDRCVSMode *mode); diff --git a/include/sndcore2/result.h b/include/sndcore2/result.h index ea9873fcc..541c6f67c 100644 --- a/include/sndcore2/result.h +++ b/include/sndcore2/result.h @@ -23,6 +23,7 @@ enum AX_RESULT AX_RESULT_VOICE_IS_RUNNING = -18, AX_RESULT_DELAY_TOO_BIG = -19, }; +WUT_CHECK_SIZE(enum AX_RESULT, 4); #ifdef __cplusplus } diff --git a/include/sndcore2/voice.h b/include/sndcore2/voice.h index f4fd2438a..2e1a73540 100644 --- a/include/sndcore2/voice.h +++ b/include/sndcore2/voice.h @@ -54,12 +54,14 @@ enum AX_VOICE_FORMAT AX_VOICE_FORMAT_LPCM16 = 10, AX_VOICE_FORMAT_LPCM8 = 25, }; +WUT_CHECK_SIZE(enum AX_VOICE_FORMAT, 4); enum AX_VOICE_LOOP { AX_VOICE_LOOP_DISABLED = 0, AX_VOICE_LOOP_ENABLED = 1, }; +WUT_CHECK_SIZE(enum AX_VOICE_LOOP, 4); enum AX_VOICE_RENDERER { @@ -67,6 +69,7 @@ enum AX_VOICE_RENDERER AX_VOICE_RENDERER_CPU = 1, AX_VOICE_RENDERER_AUTO = 2, }; +WUT_CHECK_SIZE(enum AX_VOICE_RENDERER, 4); enum AX_VOICE_RATIO_RESULT { @@ -74,6 +77,7 @@ enum AX_VOICE_RATIO_RESULT AX_VOICE_RATIO_RESULT_LESS_THAN_ZERO = -1, AX_VOICE_RATIO_RESULT_GREATER_THAN_SOMETHING = -2, }; +WUT_CHECK_SIZE(enum AX_VOICE_RATIO_RESULT, 4); enum AX_VOICE_SRC_TYPE { @@ -83,18 +87,21 @@ enum AX_VOICE_SRC_TYPE AX_VOICE_SRC_TYPE_UNK1 = 3, AX_VOICE_SRC_TYPE_UNK2 = 4, }; +WUT_CHECK_SIZE(enum AX_VOICE_SRC_TYPE, 4); enum AX_VOICE_STATE { AX_VOICE_STATE_STOPPED = 0, AX_VOICE_STATE_PLAYING = 1, }; +WUT_CHECK_SIZE(enum AX_VOICE_STATE, 4); enum AX_VOICE_TYPE { // Unknown AX_VOICE_TYPE_UNKNOWN }; +WUT_CHECK_SIZE(enum AX_VOICE_TYPE, 4); struct AXVoiceLink { diff --git a/include/sysapp/args.h b/include/sysapp/args.h index f5159fb94..cc1448a22 100644 --- a/include/sysapp/args.h +++ b/include/sysapp/args.h @@ -33,6 +33,7 @@ typedef enum SYSArgIDEnum SYS_ARG_ID_MIV_DATA = 0x12c, SYS_ARG_ID_JOIN_PID = 0x190, } SYSArgIDEnum; +WUT_CHECK_SIZE(SYSArgIDEnum, 4); typedef enum SYSArgTypeEnum { @@ -41,6 +42,7 @@ typedef enum SYSArgTypeEnum SYS_ARG_TYPE_DATA = 3, SYS_ARG_TYPE_STRING = 4, } SYSArgTypeEnum; +WUT_CHECK_SIZE(SYSArgTypeEnum, 4); struct SYSArgDataBlock { diff --git a/include/sysapp/switch.h b/include/sysapp/switch.h index f28ed2876..5c0f24490 100644 --- a/include/sysapp/switch.h +++ b/include/sysapp/switch.h @@ -86,6 +86,7 @@ typedef enum SysAppPFID SYSAPP_PFID_CABINETU = 17, SYSAPP_PFID_TEST_OVERLAY = 31, } SysAppPFID; +WUT_CHECK_SIZE(SysAppPFID, 4); /** * Initiate a switch into the controller sync menu. This is the same menu diff --git a/include/sysapp/title.h b/include/sysapp/title.h index 62fc90b7b..b3228a944 100644 --- a/include/sysapp/title.h +++ b/include/sysapp/title.h @@ -30,6 +30,7 @@ typedef enum SYSTEM_APP_ID SYSTEM_APP_ID_WIIU_CHAT = 10, SYSTEM_APP_ID_SOFTWARE_DATA_TRANSFER = 11, } SYSTEM_APP_ID; +WUT_CHECK_SIZE(SYSTEM_APP_ID, 4); // for compatibility WUT_DEPRECATED("This enum name is misleading and incorrect. Please use SYSTEM_APP_ID_WII_U_MENU") diff --git a/include/vpad/input.h b/include/vpad/input.h index 281cfe621..014fd9a18 100644 --- a/include/vpad/input.h +++ b/include/vpad/input.h @@ -78,6 +78,7 @@ typedef enum VPADButtons //! The emulated down button on the left stick. VPAD_STICK_L_EMULATION_DOWN = 0x08000000, } VPADButtons; +WUT_CHECK_SIZE(VPADButtons, 4); //! Wii U GamePad channel. typedef enum VPADChan @@ -87,6 +88,7 @@ typedef enum VPADChan //! Channel 1. VPAD_CHAN_1 = 1, } VPADChan; +WUT_CHECK_SIZE(VPADChan, 4); //! Touch pad validity. typedef enum VPADTouchPadValidity @@ -100,6 +102,7 @@ typedef enum VPADTouchPadValidity //! Y position is inaccurate. VPAD_INVALID_Y = 0x2, } VPADTouchPadValidity; +WUT_CHECK_SIZE(VPADTouchPadValidity, 4); //! Touch pad resolution. typedef enum VPADTouchPadResolution @@ -111,6 +114,7 @@ typedef enum VPADTouchPadResolution //! 854 x 480 resolution. VPAD_TP_854X480 = 2, } VPADTouchPadResolution; +WUT_CHECK_SIZE(VPADTouchPadResolution, 4); //! Read error. typedef enum VPADReadError @@ -126,6 +130,7 @@ typedef enum VPADReadError //! VPAD is uninitialized, need to call VPADInit() VPAD_READ_UNINITIALIZED = -5, } VPADReadError; +WUT_CHECK_SIZE(VPADReadError, 4); //! LCD mode. typedef enum VPADLcdMode @@ -137,6 +142,7 @@ typedef enum VPADLcdMode //! Display is on as normal. VPAD_LCD_ON = 0xFF, } VPADLcdMode; +WUT_CHECK_SIZE(VPADLcdMode, 4); //! Gyro zero drift mode. typedef enum VPADGyroZeroDriftMode @@ -146,6 +152,7 @@ typedef enum VPADGyroZeroDriftMode VPAD_GYRO_ZERODRIFT_TIGHT, VPAD_GYRO_ZERODRIFT_NONE } VPADGyroZeroDriftMode; +WUT_CHECK_SIZE(VPADGyroZeroDriftMode, 4); //! 2D vector. struct VPADVec2D @@ -329,6 +336,7 @@ typedef enum { //! Indicates that another device is connected VPAD_IRC_STATUS_FLAG_CONNECTED = 2, } VPADIRCStatusFlags; +WUT_CHECK_SIZE(VPADIRCStatusFlags, 4); typedef void(*VPADSamplingCallback)(VPADChan chan);