Updated source to match SDL function prototype style
parent
a828f5897e
commit
737aa881fa
|
@ -448,8 +448,7 @@ void SDL_QuitSubSystem(Uint32 flags)
|
|||
#endif
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_WasInit(Uint32 flags)
|
||||
Uint32 SDL_WasInit(Uint32 flags)
|
||||
{
|
||||
int i;
|
||||
int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
|
||||
|
|
|
@ -203,8 +203,7 @@ int SDL_AtomicSet(SDL_AtomicInt *a, int v)
|
|||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_AtomicSetPtr(void **a, void *v)
|
||||
void *SDL_AtomicSetPtr(void **a, void *v)
|
||||
{
|
||||
#ifdef HAVE_MSC_ATOMICS
|
||||
return _InterlockedExchangePointer(a, v);
|
||||
|
@ -270,8 +269,7 @@ int SDL_AtomicGet(SDL_AtomicInt *a)
|
|||
#endif
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_AtomicGetPtr(void **a)
|
||||
void *SDL_AtomicGetPtr(void **a)
|
||||
{
|
||||
#ifdef HAVE_ATOMIC_LOAD_N
|
||||
return __atomic_load_n(a, __ATOMIC_SEQ_CST);
|
||||
|
|
|
@ -495,8 +495,7 @@ int SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len)
|
|||
return rc;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
|
||||
Uint32 SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
|
||||
{
|
||||
SDL_AudioDevice *device = get_audio_device(devid);
|
||||
Uint32 rc;
|
||||
|
@ -514,8 +513,7 @@ SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len)
|
|||
return rc;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
|
||||
Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid)
|
||||
{
|
||||
Uint32 retval = 0;
|
||||
SDL_AudioDevice *device = get_audio_device(devid);
|
||||
|
@ -1074,8 +1072,7 @@ static void close_audio_device(SDL_AudioDevice *device)
|
|||
SDL_free(device);
|
||||
}
|
||||
|
||||
static Uint16
|
||||
GetDefaultSamplesFromFreq(int freq)
|
||||
static Uint16 GetDefaultSamplesFromFreq(int freq)
|
||||
{
|
||||
/* Pick a default of ~46 ms at desired frequency */
|
||||
/* !!! FIXME: remove this when the non-Po2 resampling is in. */
|
||||
|
|
|
@ -120,8 +120,7 @@ void WIN_CoUninitialize(void)
|
|||
}
|
||||
|
||||
#ifndef __WINRT__
|
||||
void *
|
||||
WIN_LoadComBaseFunction(const char *name)
|
||||
void *WIN_LoadComBaseFunction(const char *name)
|
||||
{
|
||||
static SDL_bool s_bLoaded;
|
||||
static HMODULE s_hComBase;
|
||||
|
|
|
@ -356,8 +356,7 @@ static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize)
|
|||
typedef Sint32(SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize);
|
||||
extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32);
|
||||
|
||||
Sint32
|
||||
SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
|
||||
Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize)
|
||||
{
|
||||
return initialize_jumptable(apiver, table, tablesize);
|
||||
}
|
||||
|
|
|
@ -885,8 +885,7 @@ void SDL_QuitMouse(void)
|
|||
SDL_MouseRelativeWarpMotionChanged, mouse);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetMouseState(float *x, float *y)
|
||||
Uint32 SDL_GetMouseState(float *x, float *y)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
|
@ -899,8 +898,7 @@ SDL_GetMouseState(float *x, float *y)
|
|||
return GetButtonState(mouse, SDL_TRUE);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetRelativeMouseState(float *x, float *y)
|
||||
Uint32 SDL_GetRelativeMouseState(float *x, float *y)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
|
@ -915,8 +913,7 @@ SDL_GetRelativeMouseState(float *x, float *y)
|
|||
return GetButtonState(mouse, SDL_TRUE);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetGlobalMouseState(float *x, float *y)
|
||||
Uint32 SDL_GetGlobalMouseState(float *x, float *y)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
|
|
|
@ -669,8 +669,7 @@ void SDL_DestroyRW(SDL_RWops *area)
|
|||
}
|
||||
|
||||
/* Load all the data from an SDL data stream */
|
||||
void *
|
||||
SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
|
||||
void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
|
||||
{
|
||||
static const Sint64 FILE_CHUNK_SIZE = 1024;
|
||||
Sint64 size;
|
||||
|
@ -733,38 +732,32 @@ done:
|
|||
return data;
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_LoadFile(const char *file, size_t *datasize)
|
||||
void *SDL_LoadFile(const char *file, size_t *datasize)
|
||||
{
|
||||
return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_RWsize(SDL_RWops *context)
|
||||
Sint64 SDL_RWsize(SDL_RWops *context)
|
||||
{
|
||||
return context->size(context);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
|
||||
Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)
|
||||
{
|
||||
return context->seek(context, offset, whence);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_RWtell(SDL_RWops *context)
|
||||
Sint64 SDL_RWtell(SDL_RWops *context)
|
||||
{
|
||||
return context->seek(context, 0, SDL_RW_SEEK_CUR);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size)
|
||||
Sint64 SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size)
|
||||
{
|
||||
return context->read(context, ptr, size);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size)
|
||||
Sint64 SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size)
|
||||
{
|
||||
return context->write(context, ptr, size);
|
||||
}
|
||||
|
@ -784,8 +777,7 @@ Uint8 SDL_ReadU8(SDL_RWops *src)
|
|||
return value;
|
||||
}
|
||||
|
||||
Uint16
|
||||
SDL_ReadLE16(SDL_RWops *src)
|
||||
Uint16 SDL_ReadLE16(SDL_RWops *src)
|
||||
{
|
||||
Uint16 value = 0;
|
||||
|
||||
|
@ -793,8 +785,7 @@ SDL_ReadLE16(SDL_RWops *src)
|
|||
return SDL_SwapLE16(value);
|
||||
}
|
||||
|
||||
Uint16
|
||||
SDL_ReadBE16(SDL_RWops *src)
|
||||
Uint16 SDL_ReadBE16(SDL_RWops *src)
|
||||
{
|
||||
Uint16 value = 0;
|
||||
|
||||
|
@ -802,8 +793,7 @@ SDL_ReadBE16(SDL_RWops *src)
|
|||
return SDL_SwapBE16(value);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_ReadLE32(SDL_RWops *src)
|
||||
Uint32 SDL_ReadLE32(SDL_RWops *src)
|
||||
{
|
||||
Uint32 value = 0;
|
||||
|
||||
|
@ -811,8 +801,7 @@ SDL_ReadLE32(SDL_RWops *src)
|
|||
return SDL_SwapLE32(value);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_ReadBE32(SDL_RWops *src)
|
||||
Uint32 SDL_ReadBE32(SDL_RWops *src)
|
||||
{
|
||||
Uint32 value = 0;
|
||||
|
||||
|
@ -820,8 +809,7 @@ SDL_ReadBE32(SDL_RWops *src)
|
|||
return SDL_SwapBE32(value);
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_ReadLE64(SDL_RWops *src)
|
||||
Uint64 SDL_ReadLE64(SDL_RWops *src)
|
||||
{
|
||||
Uint64 value = 0;
|
||||
|
||||
|
@ -829,8 +817,7 @@ SDL_ReadLE64(SDL_RWops *src)
|
|||
return SDL_SwapLE64(value);
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_ReadBE64(SDL_RWops *src)
|
||||
Uint64 SDL_ReadBE64(SDL_RWops *src)
|
||||
{
|
||||
Uint64 value = 0;
|
||||
|
||||
|
|
|
@ -943,8 +943,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
|
|||
return 0;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
Uint32 result = 0;
|
||||
|
||||
|
@ -1193,8 +1192,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
|
|||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -497,8 +497,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
|
|||
return 0;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
return SDL_JOYCAP_RUMBLE;
|
||||
}
|
||||
|
@ -583,8 +582,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl
|
|||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -196,8 +196,7 @@ static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, {
|
|||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
Uint32
|
||||
D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
|
||||
Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
|
||||
{
|
||||
switch (dxgiFormat) {
|
||||
case DXGI_FORMAT_B8G8R8A8_UNORM:
|
||||
|
|
|
@ -272,8 +272,7 @@ UINT D3D12_Align(UINT location, UINT alignment)
|
|||
return (location + (alignment - 1)) & ~(alignment - 1);
|
||||
}
|
||||
|
||||
Uint32
|
||||
D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
|
||||
Uint32 D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
|
||||
{
|
||||
switch (dxgiFormat) {
|
||||
case DXGI_FORMAT_B8G8R8A8_UNORM:
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
#include "SDL_render_vita_gxm_memory.h"
|
||||
|
||||
void *
|
||||
vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
|
||||
void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid)
|
||||
{
|
||||
void *mem;
|
||||
|
||||
|
@ -63,8 +62,7 @@ void vita_mem_free(SceUID uid)
|
|||
sceKernelFreeMemBlock(uid);
|
||||
}
|
||||
|
||||
void *
|
||||
vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
|
||||
void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size)
|
||||
{
|
||||
void *mem;
|
||||
|
||||
|
@ -122,8 +120,7 @@ void vita_gpu_mem_destroy(VITA_GXM_RenderData *data)
|
|||
}
|
||||
}
|
||||
|
||||
void *
|
||||
vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
|
||||
void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
|
||||
{
|
||||
void *mem = NULL;
|
||||
|
||||
|
@ -150,8 +147,7 @@ void vita_mem_vertex_usse_free(SceUID uid)
|
|||
sceKernelFreeMemBlock(uid);
|
||||
}
|
||||
|
||||
void *
|
||||
vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
|
||||
void *vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset)
|
||||
{
|
||||
void *mem = NULL;
|
||||
|
||||
|
|
|
@ -79,8 +79,7 @@ static void patcher_host_free(void *user_data, void *mem)
|
|||
SDL_free(mem);
|
||||
}
|
||||
|
||||
void *
|
||||
pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
|
||||
void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
|
||||
{
|
||||
|
||||
if ((data->pool_index + size) < VITA_GXM_POOL_SIZE) {
|
||||
|
@ -92,8 +91,7 @@ pool_malloc(VITA_GXM_RenderData *data, unsigned int size)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void *
|
||||
pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
|
||||
void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment)
|
||||
{
|
||||
unsigned int new_index = (data->pool_index + alignment - 1) & ~(alignment - 1);
|
||||
if ((new_index + size) < VITA_GXM_POOL_SIZE) {
|
||||
|
@ -957,8 +955,7 @@ gxm_texture_get_format(const gxm_texture *texture)
|
|||
return sceGxmTextureGetFormat(&texture->gxm_tex);
|
||||
}
|
||||
|
||||
void *
|
||||
gxm_texture_get_datap(const gxm_texture *texture)
|
||||
void *gxm_texture_get_datap(const gxm_texture *texture)
|
||||
{
|
||||
return sceGxmTextureGetData(&texture->gxm_tex);
|
||||
}
|
||||
|
|
|
@ -528,8 +528,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size,
|
|||
|
||||
#endif /* HAVE_QSORT */
|
||||
|
||||
void *
|
||||
SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
|
||||
void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *))
|
||||
{
|
||||
#ifdef HAVE_BSEARCH
|
||||
return bsearch(key, base, nmemb, size, compare);
|
||||
|
|
|
@ -533,8 +533,7 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a' + ((x) - 'A'
|
|||
|
||||
/* This file contains a portable memcpy manipulation function for SDL */
|
||||
|
||||
void *
|
||||
SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
|
||||
void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
/* Presumably this is well tuned for speed.
|
||||
|
@ -586,8 +585,7 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src,
|
|||
#endif /* __GNUC__ */
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
|
||||
void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
|
||||
{
|
||||
#ifdef HAVE_MEMSET
|
||||
return memset(dst, c, len);
|
||||
|
@ -636,8 +634,7 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len)
|
|||
}
|
||||
|
||||
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
|
||||
void *
|
||||
SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
void *SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
{
|
||||
#if defined(__APPLE__) && defined(HAVE_STRING_H)
|
||||
memset_pattern4(dst, &val, dwords * 4);
|
||||
|
|
|
@ -287,8 +287,7 @@ SDL_ScanFloat(const char *text, double *valuep)
|
|||
}
|
||||
#endif
|
||||
|
||||
void *
|
||||
SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
|
||||
void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
|
||||
{
|
||||
#ifdef HAVE_MEMMOVE
|
||||
return memmove(dst, src, len);
|
||||
|
@ -959,8 +958,7 @@ SDL_strtoul(const char *string, char **endp, int base)
|
|||
#endif /* HAVE_STRTOUL */
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDL_strtoll(const char *string, char **endp, int base)
|
||||
Sint64 SDL_strtoll(const char *string, char **endp, int base)
|
||||
{
|
||||
#ifdef HAVE_STRTOLL
|
||||
return strtoll(string, endp, base);
|
||||
|
@ -984,8 +982,7 @@ SDL_strtoll(const char *string, char **endp, int base)
|
|||
#endif /* HAVE_STRTOLL */
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_strtoull(const char *string, char **endp, int base)
|
||||
Uint64 SDL_strtoull(const char *string, char **endp, int base)
|
||||
{
|
||||
#ifdef HAVE_STRTOULL
|
||||
return strtoull(string, endp, base);
|
||||
|
|
|
@ -71,40 +71,35 @@ Sint8 SDLTest_RandomSint8(void)
|
|||
return (Sint8)SDLTest_RandomInt(&rndContext) & 0x000000FF;
|
||||
}
|
||||
|
||||
Uint16
|
||||
SDLTest_RandomUint16(void)
|
||||
Uint16 SDLTest_RandomUint16(void)
|
||||
{
|
||||
fuzzerInvocationCounter++;
|
||||
|
||||
return (Uint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
|
||||
}
|
||||
|
||||
Sint16
|
||||
SDLTest_RandomSint16(void)
|
||||
Sint16 SDLTest_RandomSint16(void)
|
||||
{
|
||||
fuzzerInvocationCounter++;
|
||||
|
||||
return (Sint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF;
|
||||
}
|
||||
|
||||
Sint32
|
||||
SDLTest_RandomSint32(void)
|
||||
Sint32 SDLTest_RandomSint32(void)
|
||||
{
|
||||
fuzzerInvocationCounter++;
|
||||
|
||||
return (Sint32)SDLTest_RandomInt(&rndContext);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDLTest_RandomUint32(void)
|
||||
Uint32 SDLTest_RandomUint32(void)
|
||||
{
|
||||
fuzzerInvocationCounter++;
|
||||
|
||||
return (Uint32)SDLTest_RandomInt(&rndContext);
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDLTest_RandomUint64(void)
|
||||
Uint64 SDLTest_RandomUint64(void)
|
||||
{
|
||||
union
|
||||
{
|
||||
|
@ -121,8 +116,7 @@ SDLTest_RandomUint64(void)
|
|||
return value.v64;
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDLTest_RandomSint64(void)
|
||||
Sint64 SDLTest_RandomSint64(void)
|
||||
{
|
||||
union
|
||||
{
|
||||
|
@ -139,8 +133,7 @@ SDLTest_RandomSint64(void)
|
|||
return (Sint64)value.v64;
|
||||
}
|
||||
|
||||
Sint32
|
||||
SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
|
||||
Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax)
|
||||
{
|
||||
Sint64 min = pMin;
|
||||
Sint64 max = pMax;
|
||||
|
@ -254,8 +247,7 @@ Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_boo
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Uint16
|
||||
SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
|
||||
Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* max value for Uint16 */
|
||||
const Uint64 maxValue = USHRT_MAX;
|
||||
|
@ -264,8 +256,7 @@ SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool v
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
|
||||
Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* max value for Uint32 */
|
||||
#if ((ULONG_MAX) == (UINT_MAX))
|
||||
|
@ -278,8 +269,7 @@ SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool v
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
|
||||
Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* max value for Uint64 */
|
||||
const Uint64 maxValue = UINT64_MAX;
|
||||
|
@ -384,8 +374,7 @@ Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_boo
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Sint16
|
||||
SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
|
||||
Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* min & max values for Sint16 */
|
||||
const Sint64 maxValue = SHRT_MAX;
|
||||
|
@ -395,8 +384,7 @@ SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool v
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Sint32
|
||||
SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
|
||||
Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* min & max values for Sint32 */
|
||||
#if ((ULONG_MAX) == (UINT_MAX))
|
||||
|
@ -411,8 +399,7 @@ SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool v
|
|||
validDomain);
|
||||
}
|
||||
|
||||
Sint64
|
||||
SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
|
||||
Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain)
|
||||
{
|
||||
/* min & max values for Sint64 */
|
||||
const Sint64 maxValue = INT64_MAX;
|
||||
|
|
|
@ -33,8 +33,7 @@ SDL_TLSCreate(void)
|
|||
return SDL_AtomicIncRef(&SDL_tls_id) + 1;
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_TLSGet(SDL_TLSID id)
|
||||
void *SDL_TLSGet(SDL_TLSID id)
|
||||
{
|
||||
SDL_TLSData *storage;
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
|||
return SDL_SetError("SDL not built with thread support");
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -144,8 +143,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
|||
return retval;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
Uint32 value;
|
||||
|
||||
|
|
|
@ -139,8 +139,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
|||
return info->iVal;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
if (sem == NULL) {
|
||||
SDL_InvalidParamError("sem");
|
||||
|
|
|
@ -149,8 +149,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
|||
return retval;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
|
|
@ -377,8 +377,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
|||
return SDL_sem_impl_active.WaitTimeoutNS(sem, timeoutNS);
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
return SDL_sem_impl_active.Value(sem);
|
||||
}
|
||||
|
|
|
@ -565,8 +565,7 @@ void SDL_QuitTicks(void)
|
|||
tick_start = 0;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetTicksNS(void)
|
||||
Uint64 SDL_GetTicksNS(void)
|
||||
{
|
||||
Uint64 starting_value, value;
|
||||
|
||||
|
|
|
@ -22,15 +22,13 @@
|
|||
|
||||
#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -25,14 +25,12 @@
|
|||
#include <kernel/OS.h>
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
return system_time();
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return SDL_US_PER_SECOND;
|
||||
}
|
||||
|
|
|
@ -25,14 +25,12 @@
|
|||
#include <3ds.h>
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
return svcGetSystemTick();
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return SYSCLOCK_ARM11;
|
||||
}
|
||||
|
|
|
@ -32,15 +32,13 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
/* FIXME: Need to account for 32-bit wrapping */
|
||||
return (Uint64)User::TickCount();
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return SDL_US_PER_SECOND;
|
||||
}
|
||||
|
|
|
@ -29,14 +29,12 @@
|
|||
#include <sys/time.h>
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
return GetTimerSystemTime();
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return kBUSCLK;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,7 @@
|
|||
#include <pspthreadman.h>
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
Uint64 ticks;
|
||||
struct timeval now;
|
||||
|
@ -42,8 +41,7 @@ SDL_GetPerformanceCounter(void)
|
|||
return ticks;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return SDL_US_PER_SECOND;
|
||||
}
|
||||
|
|
|
@ -82,8 +82,7 @@ static void CheckMonotonicTime(void)
|
|||
checked_monotonic_time = SDL_TRUE;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
Uint64 ticks;
|
||||
|
||||
|
@ -116,8 +115,7 @@ SDL_GetPerformanceCounter(void)
|
|||
return ticks;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
if (!checked_monotonic_time) {
|
||||
CheckMonotonicTime();
|
||||
|
|
|
@ -29,14 +29,12 @@
|
|||
#include <psp2/kernel/processmgr.h>
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
return sceKernelGetProcessTimeWide();
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
return SDL_US_PER_SECOND;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceCounter(void)
|
||||
Uint64 SDL_GetPerformanceCounter(void)
|
||||
{
|
||||
LARGE_INTEGER counter;
|
||||
const BOOL rc = QueryPerformanceCounter(&counter);
|
||||
|
@ -34,8 +33,7 @@ SDL_GetPerformanceCounter(void)
|
|||
return (Uint64)counter.QuadPart;
|
||||
}
|
||||
|
||||
Uint64
|
||||
SDL_GetPerformanceFrequency(void)
|
||||
Uint64 SDL_GetPerformanceFrequency(void)
|
||||
{
|
||||
LARGE_INTEGER frequency;
|
||||
const BOOL rc = QueryPerformanceFrequency(&frequency);
|
||||
|
|
|
@ -78,8 +78,7 @@ int SDL_SetPrimarySelectionText(const char *text)
|
|||
}
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_GetClipboardData(size_t *length, const char *mime_type)
|
||||
void *SDL_GetClipboardData(size_t *length, const char *mime_type)
|
||||
{
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
if (_this == NULL) {
|
||||
|
@ -193,8 +192,7 @@ SDL_HasPrimarySelectionText(void)
|
|||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
void *
|
||||
SDL_GetClipboardUserdata(void)
|
||||
void *SDL_GetClipboardUserdata(void)
|
||||
{
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
|
||||
|
|
|
@ -301,9 +301,7 @@ SDL_GetMasksForPixelFormatEnum(Uint32 format, int *bpp, Uint32 *Rmask,
|
|||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
Uint32
|
||||
SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask,
|
||||
Uint32 Amask)
|
||||
Uint32 SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
|
||||
{
|
||||
switch (bpp) {
|
||||
case 1:
|
||||
|
@ -861,8 +859,7 @@ void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alph
|
|||
}
|
||||
|
||||
/* Find the opaque pixel value corresponding to an RGB triple */
|
||||
Uint32
|
||||
SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
|
||||
Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
|
||||
{
|
||||
if (format->palette == NULL) {
|
||||
return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | format->Amask;
|
||||
|
@ -872,8 +869,7 @@ SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)
|
|||
}
|
||||
|
||||
/* Find the pixel value corresponding to an RGBA quadruple */
|
||||
Uint32
|
||||
SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b,
|
||||
Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b,
|
||||
Uint8 a)
|
||||
{
|
||||
if (format->palette == NULL) {
|
||||
|
|
|
@ -132,8 +132,7 @@ static int SDLCALL SDL_MetalViewEventWatch(void *userdata, SDL_Event *event)
|
|||
|
||||
@end
|
||||
|
||||
SDL_MetalView
|
||||
Cocoa_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
SDL_MetalView Cocoa_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
{
|
||||
@autoreleasepool {
|
||||
SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->driverdata;
|
||||
|
@ -172,8 +171,7 @@ void Cocoa_Metal_DestroyView(SDL_VideoDevice *_this, SDL_MetalView view)
|
|||
}
|
||||
}
|
||||
|
||||
void *
|
||||
Cocoa_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view)
|
||||
void *Cocoa_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view)
|
||||
{
|
||||
@autoreleasepool {
|
||||
SDL_cocoametalview *cocoaview = (__bridge SDL_cocoametalview *)view;
|
||||
|
|
|
@ -2330,8 +2330,7 @@ void Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window *window, SDL_V
|
|||
}
|
||||
}
|
||||
|
||||
void *
|
||||
Cocoa_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size)
|
||||
void *Cocoa_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size)
|
||||
{
|
||||
@autoreleasepool {
|
||||
SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->driverdata;
|
||||
|
|
|
@ -74,8 +74,7 @@
|
|||
|
||||
@end
|
||||
|
||||
SDL_MetalView
|
||||
UIKit_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
SDL_MetalView UIKit_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
{
|
||||
@autoreleasepool {
|
||||
SDL_UIKitWindowData *data = (__bridge SDL_UIKitWindowData *)window->driverdata;
|
||||
|
@ -115,8 +114,7 @@ void UIKit_Metal_DestroyView(SDL_VideoDevice *_this, SDL_MetalView view)
|
|||
}
|
||||
}
|
||||
|
||||
void *
|
||||
UIKit_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view)
|
||||
void *UIKit_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view)
|
||||
{
|
||||
@autoreleasepool {
|
||||
SDL_uikitview *uiview = (__bridge SDL_uikitview *)view;
|
||||
|
|
|
@ -249,8 +249,7 @@ int X11_GetVisualInfoFromVisual(Display *display, Visual *visual, XVisualInfo *v
|
|||
return -1;
|
||||
}
|
||||
|
||||
Uint32
|
||||
X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo)
|
||||
Uint32 X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo)
|
||||
{
|
||||
if (vinfo->class == DirectColor || vinfo->class == TrueColor) {
|
||||
int bpp;
|
||||
|
|
|
@ -218,8 +218,7 @@ static void X11_SetKeyboardFocus(SDL_Window *window)
|
|||
SDL_SetKeyboardFocus(window);
|
||||
}
|
||||
|
||||
Uint32
|
||||
X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow)
|
||||
Uint32 X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow)
|
||||
{
|
||||
SDL_VideoData *videodata = _this->driverdata;
|
||||
Display *display = videodata->display;
|
||||
|
@ -1657,8 +1656,7 @@ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop)
|
|||
p->type = type;
|
||||
}
|
||||
|
||||
void *
|
||||
X11_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size)
|
||||
void *X11_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size)
|
||||
{
|
||||
SDL_WindowData *data = window->driverdata;
|
||||
Display *display = data->videodata->display;
|
||||
|
|
Loading…
Reference in New Issue