My Project
SDL_endian.h File Reference
#include "SDL_stdinc.h"
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Macros

Swap to native

Byteswap item from the specified endianness to the native endianness.

#define SDL_SwapLE16(X)   (X)
 
#define SDL_SwapLE32(X)   (X)
 
#define SDL_SwapLE64(X)   (X)
 
#define SDL_SwapFloatLE(X)   (X)
 
#define SDL_SwapBE16(X)   SDL_Swap16(X)
 
#define SDL_SwapBE32(X)   SDL_Swap32(X)
 
#define SDL_SwapBE64(X)   SDL_Swap64(X)
 
#define SDL_SwapFloatBE(X)   SDL_SwapFloat(X)
 

The two types of endianness

#define SDL_LIL_ENDIAN   1234
 
#define SDL_BIG_ENDIAN   4321
 
#define SDL_BYTEORDER   SDL_LIL_ENDIAN
 
SDL_FORCE_INLINE Uint16 SDL_Swap16 (Uint16 x)
 
SDL_FORCE_INLINE Uint32 SDL_Swap32 (Uint32 x)
 
SDL_FORCE_INLINE Uint64 SDL_Swap64 (Uint64 x)
 
SDL_FORCE_INLINE float SDL_SwapFloat (float x)
 

Detailed Description

Functions for reading and writing endian-specific values