mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-02 16:26:28 +00:00
Fixed Visual C++ build
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403494
This commit is contained in:
parent
9116448bf3
commit
e43f6d619e
@ -152,7 +152,7 @@ if test x$enable_libc = xyes; then
|
||||
AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep)
|
||||
|
||||
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
|
||||
AC_CHECK_FUNCS(copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
|
||||
AC_CHECK_FUNCS(ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
|
||||
|
||||
AC_CHECK_LIB(iconv, libiconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
|
||||
AC_CHECK_FUNCS(iconv)
|
||||
|
@ -130,6 +130,7 @@
|
||||
#undef HAVE_SNPRINTF
|
||||
#undef HAVE_VSNPRINTF
|
||||
#undef HAVE_M_PI
|
||||
#undef HAVE_CEIL
|
||||
#undef HAVE_COPYSIGN
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
|
@ -117,6 +117,7 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
|
@ -646,6 +646,12 @@ extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen,
|
||||
#define M_PI 3.14159265358979323846264338327950288 /* pi */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CEIL
|
||||
#define SDL_ceil ceil
|
||||
#else
|
||||
#define SDL_ceil(x) ((double)(int)((x)+0.5))
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COPYSIGN
|
||||
#define SDL_copysign copysign
|
||||
#else
|
||||
|
@ -478,7 +478,6 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
|
||||
{
|
||||
SDL_DisplayMode desktop_mode;
|
||||
SDL_DisplayMode mode;
|
||||
const char *env;
|
||||
int window_x = SDL_WINDOWPOS_UNDEFINED;
|
||||
int window_y = SDL_WINDOWPOS_UNDEFINED;
|
||||
Uint32 window_flags;
|
||||
|
@ -347,7 +347,6 @@ SDL_RunAudio(void *devicep)
|
||||
void *udata;
|
||||
void (SDLCALL * fill) (void *userdata, Uint8 * stream, int len);
|
||||
int silence;
|
||||
int stream_max_len;
|
||||
|
||||
/* For streaming when the buffer sizes don't match up */
|
||||
Uint8 *istream;
|
||||
|
@ -937,7 +937,7 @@ SDL_BuildAudioResampleCVT(SDL_AudioCVT * cvt, int dst_channels,
|
||||
cvt->filters[cvt->filter_index++] = filter;
|
||||
if (src_rate < dst_rate) {
|
||||
const double mult = ((double) dst_rate) / ((double) src_rate);
|
||||
cvt->len_mult *= (int) ceil(mult); /* !!! FIXME: C runtime dependency. */
|
||||
cvt->len_mult *= (int) SDL_ceil(mult);
|
||||
cvt->len_ratio *= mult;
|
||||
} else {
|
||||
cvt->len_ratio /= ((double) src_rate) / ((double) dst_rate);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -216,7 +216,7 @@ ${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
const $srctype *src;
|
||||
$tctype *dst;
|
||||
|
||||
#ifdef DEBUG_CONVERT
|
||||
#if DEBUG_CONVERT
|
||||
fprintf(stderr, "Converting AUDIO_${from} to AUDIO_${to}.\\n");
|
||||
#endif
|
||||
|
||||
@ -391,7 +391,7 @@ sub buildArbitraryResampleFunc {
|
||||
static void SDLCALL
|
||||
${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
{
|
||||
#ifdef DEBUG_CONVERT
|
||||
#if DEBUG_CONVERT
|
||||
fprintf(stderr, "$resample arbitrary (x%f) AUDIO_${from}, ${channels} channels.\\n", cvt->rate_incr);
|
||||
#endif
|
||||
|
||||
@ -529,7 +529,7 @@ sub buildMultipleResampleFunc {
|
||||
static void SDLCALL
|
||||
${sym}(SDL_AudioCVT * cvt, SDL_AudioFormat format)
|
||||
{
|
||||
#ifdef DEBUG_CONVERT
|
||||
#if DEBUG_CONVERT
|
||||
fprintf(stderr, "$resample (x${multiple}) AUDIO_${from}, ${channels} channels.\\n");
|
||||
#endif
|
||||
|
||||
|
@ -578,8 +578,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
/* Don't start the screensaver or blank the monitor in fullscreen apps */
|
||||
if ((wParam & 0xFFF0) == SC_SCREENSAVE ||
|
||||
(wParam & 0xFFF0) == SC_MONITORPOWER) {
|
||||
SDL_VideoData *videodata = data->videodata;
|
||||
if (videodata->suspend_screensaver) {
|
||||
if (SDL_GetVideoDevice()->suspend_screensaver) {
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user