Removed SDL_round() because the license wasn't compatible with zlib
This commit is contained in:
parent
00b70124b6
commit
b3e4782510
20 changed files with 12 additions and 37 deletions
|
@ -591,4 +591,3 @@
|
|||
#define SDL_QueueAudio SDL_QueueAudio_REAL
|
||||
#define SDL_GetQueuedAudioSize SDL_GetQueuedAudioSize_REAL
|
||||
#define SDL_ClearQueuedAudio SDL_ClearQueuedAudio_REAL
|
||||
#define SDL_round SDL_round_REAL
|
||||
|
|
|
@ -623,4 +623,3 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_HasAVX2,(void),(),return)
|
|||
SDL_DYNAPI_PROC(int,SDL_QueueAudio,(SDL_AudioDeviceID a, const void *b, Uint32 c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetQueuedAudioSize,(SDL_AudioDeviceID a),(a),return)
|
||||
SDL_DYNAPI_PROC(void,SDL_ClearQueuedAudio,(SDL_AudioDeviceID a),(a),)
|
||||
SDL_DYNAPI_PROC(double,SDL_round,(double a),(a),return)
|
||||
|
|
|
@ -30,7 +30,6 @@ double SDL_uclibc_fabs(double x);
|
|||
double SDL_uclibc_floor(double x);
|
||||
double SDL_uclibc_log(double x);
|
||||
double SDL_uclibc_pow(double x, double y);
|
||||
double SDL_uclibc_round(double x);
|
||||
double SDL_uclibc_scalbn(double x, int n);
|
||||
double SDL_uclibc_sin(double x);
|
||||
double SDL_uclibc_sqrt(double x);
|
||||
|
|
|
@ -37,7 +37,6 @@ typedef unsigned int u_int32_t;
|
|||
#define floor SDL_uclibc_floor
|
||||
#define __ieee754_log SDL_uclibc_log
|
||||
#define __ieee754_pow SDL_uclibc_pow
|
||||
#define round SDL_uclibc_round
|
||||
#define scalbn SDL_uclibc_scalbn
|
||||
#define sin SDL_uclibc_sin
|
||||
#define __ieee754_sqrt SDL_uclibc_sqrt
|
||||
|
|
|
@ -169,16 +169,6 @@ SDL_pow(double x, double y)
|
|||
#endif /* HAVE_POW */
|
||||
}
|
||||
|
||||
double
|
||||
SDL_round(double x)
|
||||
{
|
||||
#if defined(HAVE_ROUND)
|
||||
return round(x);
|
||||
#else
|
||||
return SDL_uclibc_round(x);
|
||||
#endif /* HAVE_ROUND */
|
||||
}
|
||||
|
||||
double
|
||||
SDL_scalbn(double x, int n)
|
||||
{
|
||||
|
|
|
@ -741,15 +741,15 @@ SDL_UpperBlitScaled(SDL_Surface * src, const SDL_Rect * srcrect,
|
|||
dst_y0 += dst->clip_rect.y;
|
||||
dst_y1 += dst->clip_rect.y;
|
||||
|
||||
final_src.x = SDL_round(src_x0);
|
||||
final_src.y = SDL_round(src_y0);
|
||||
final_src.w = SDL_round(src_x1 - src_x0 + 1);
|
||||
final_src.h = SDL_round(src_y1 - src_y0 + 1);
|
||||
final_src.x = SDL_floor(src_x0 + 0.5);
|
||||
final_src.y = SDL_floor(src_y0 + 0.5);
|
||||
final_src.w = SDL_floor(src_x1 - src_x0 + 1.5);
|
||||
final_src.h = SDL_floor(src_y1 - src_y0 + 1.5);
|
||||
|
||||
final_dst.x = SDL_round(dst_x0);
|
||||
final_dst.y = SDL_round(dst_y0);
|
||||
final_dst.w = SDL_round(dst_x1 - dst_x0 + 1);
|
||||
final_dst.h = SDL_round(dst_y1 - dst_y0 + 1);
|
||||
final_dst.x = SDL_floor(dst_x0 + 0.5);
|
||||
final_dst.y = SDL_floor(dst_y0 + 0.5);
|
||||
final_dst.w = SDL_floor(dst_x1 - dst_x0 + 1.5);
|
||||
final_dst.h = SDL_floor(dst_y1 - dst_y0 + 1.5);
|
||||
|
||||
if (final_dst.w < 0)
|
||||
final_dst.w = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue