23 #ifndef __RARCH_MISCELLANEOUS_H 24 #define __RARCH_MISCELLANEOUS_H 26 #define RARCH_MAX_SUBSYSTEMS 10 27 #define RARCH_MAX_SUBSYSTEM_ROMS 10 33 #if defined(_WIN32) && !defined(_XBOX) 34 #ifndef WIN32_LEAN_AND_MEAN 35 #define WIN32_LEAN_AND_MEAN 38 #elif defined(_WIN32) && defined(_XBOX) 42 #if defined(__CELLOS_LV2__) 43 #include <sys/fs_external.h> 55 for (i = 0; i <
count;i++)
62 for (i = 0; i <
count;i++)
69 for (i = 0; i <
count; i++)
77 #ifndef PATH_MAX_LENGTH 78 #if defined(__CELLOS_LV2__) 79 #define PATH_MAX_LENGTH CELL_FS_MAX_FS_PATH_LENGTH 80 #elif defined(_XBOX1) || defined(_3DS) || defined(PSP) || defined(PS2) || defined(GEKKO)|| defined(WIIU) 81 #define PATH_MAX_LENGTH 512 83 #define PATH_MAX_LENGTH 4096 88 #define MAX(a, b) ((a) > (b) ? (a) : (b)) 92 #define MIN(a, b) ((a) < (b) ? (a) : (b)) 95 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) 97 #define BITS_GET_ELEM(a, i) ((a).data[i]) 98 #define BITS_GET_ELEM_PTR(a, i) ((a)->data[i]) 100 #define BIT_SET(a, bit) ((a)[(bit) >> 3] |= (1 << ((bit) & 7))) 101 #define BIT_CLEAR(a, bit) ((a)[(bit) >> 3] &= ~(1 << ((bit) & 7))) 102 #define BIT_GET(a, bit) (((a)[(bit) >> 3] >> ((bit) & 7)) & 1) 104 #define BIT16_SET(a, bit) ((a) |= (1 << ((bit) & 15))) 105 #define BIT16_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 15))) 106 #define BIT16_GET(a, bit) (((a) >> ((bit) & 15)) & 1) 107 #define BIT16_CLEAR_ALL(a) ((a) = 0) 109 #define BIT32_SET(a, bit) ((a) |= (1 << ((bit) & 31))) 110 #define BIT32_CLEAR(a, bit) ((a) &= ~(1 << ((bit) & 31))) 111 #define BIT32_GET(a, bit) (((a) >> ((bit) & 31)) & 1) 112 #define BIT32_CLEAR_ALL(a) ((a) = 0) 114 #define BIT64_SET(a, bit) ((a) |= (UINT64_C(1) << ((bit) & 63))) 115 #define BIT64_CLEAR(a, bit) ((a) &= ~(UINT64_C(1) << ((bit) & 63))) 116 #define BIT64_GET(a, bit) (((a) >> ((bit) & 63)) & 1) 117 #define BIT64_CLEAR_ALL(a) ((a) = 0) 119 #define BIT128_SET(a, bit) ((a).data[(bit) >> 5] |= (1 << ((bit) & 31))) 120 #define BIT128_CLEAR(a, bit) ((a).data[(bit) >> 5] &= ~(1 << ((bit) & 31))) 121 #define BIT128_GET(a, bit) (((a).data[(bit) >> 5] >> ((bit) & 31)) & 1) 122 #define BIT128_CLEAR_ALL(a) memset(&(a), 0, sizeof(a)) 124 #define BIT128_SET_PTR(a, bit) BIT128_SET(*a, bit) 125 #define BIT128_CLEAR_PTR(a, bit) BIT128_CLEAR(*a, bit) 126 #define BIT128_GET_PTR(a, bit) BIT128_GET(*a, bit) 127 #define BIT128_CLEAR_ALL_PTR(a) BIT128_CLEAR_ALL(*a) 129 #define BIT256_SET(a, bit) BIT128_SET(a, bit) 130 #define BIT256_CLEAR(a, bit) BIT128_CLEAR(a, bit) 131 #define BIT256_GET(a, bit) BIT128_GET(a, bit) 132 #define BIT256_CLEAR_ALL(a) BIT128_CLEAR_ALL(a) 134 #define BIT256_SET_PTR(a, bit) BIT256_SET(*a, bit) 135 #define BIT256_CLEAR_PTR(a, bit) BIT256_CLEAR(*a, bit) 136 #define BIT256_GET_PTR(a, bit) BIT256_GET(*a, bit) 137 #define BIT256_CLEAR_ALL_PTR(a) BIT256_CLEAR_ALL(*a) 139 #define BITS_COPY16_PTR(a,bits) \ 141 BIT128_CLEAR_ALL_PTR(a); \ 142 BITS_GET_ELEM_PTR(a, 0) = (bits) & 0xffff; \ 145 #define BITS_COPY32_PTR(a,bits) \ 147 BIT128_CLEAR_ALL_PTR(a); \ 148 BITS_GET_ELEM_PTR(a, 0) = (bits); \ 160 # define PRI_SIZET PRIu64 163 # define PRI_SIZET PRIu32 165 # define PRI_SIZET "u" 169 # define PRI_SIZET "lu" const GLvoid * ptr
Definition: nx_glsym.h:242
#define INLINE
Definition: retro_inline.h:35
static INLINE void bits_clear_bits(uint32_t *a, uint32_t *b, uint32_t count)
Definition: retro_miscellaneous.h:59
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
GLuint GLuint GLsizei count
Definition: glext.h:6292
Definition: retro_miscellaneous.h:153
static INLINE bool bits_any_set(uint32_t *ptr, uint32_t count)
Definition: retro_miscellaneous.h:66
static INLINE void bits_or_bits(uint32_t *a, uint32_t *b, uint32_t count)
Definition: retro_miscellaneous.h:52
unsigned int uint32_t
Definition: stdint.h:126
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844