mirror of
https://github.com/libretro/beetle-psx-libretro.git
synced 2024-11-23 08:49:47 +00:00
Cleanups
This commit is contained in:
parent
f3cc4effcc
commit
1b9a6944b3
@ -10,23 +10,6 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static INLINE int32 clamp_to_u8(int32 i)
|
||||
{
|
||||
if(i & 0xFFFFFF00)
|
||||
i = (((~i) >> 30) & 0xFF);
|
||||
|
||||
return(i);
|
||||
}
|
||||
|
||||
|
||||
static INLINE int32 clamp_to_u16(int32 i)
|
||||
{
|
||||
if(i & 0xFFFF0000)
|
||||
i = (((~i) >> 31) & 0xFFFF);
|
||||
|
||||
return(i);
|
||||
}
|
||||
|
||||
static INLINE void clamp(int32_t *val, ssize_t min, ssize_t max)
|
||||
{
|
||||
if(*val < min)
|
||||
@ -35,10 +18,6 @@ static INLINE void clamp(int32_t *val, ssize_t min, ssize_t max)
|
||||
*val = max;
|
||||
}
|
||||
|
||||
#define clamp_simple(val) \
|
||||
if ( (int16_t)val != val ) \
|
||||
val = (val >> 31) ^ 0x7FFF;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user