Commit 809f6ba3 authored by Sam Lantinga's avatar Sam Lantinga

Updated Visual C++ build

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403216
parent 588cd827
......@@ -345,25 +345,69 @@
>
</File>
<File
RelativePath="..\..\src\video\e_log.h"
RelativePath="..\..\src\libm\e_log.c"
>
</File>
<File
RelativePath="..\..\src\video\e_pow.h"
RelativePath="..\..\src\libm\e_pow.c"
>
</File>
<File
RelativePath="..\..\src\video\e_sqrt.h"
RelativePath="..\..\src\libm\e_rem_pio2.c"
>
</File>
<File
RelativePath="..\..\src\video\math_private.h"
RelativePath="..\..\src\libm\e_sqrt.c"
>
</File>
<File
RelativePath="..\..\src\libm\k_cos.c"
>
</File>
<File
RelativePath="..\..\src\libm\k_rem_pio2.c"
>
</File>
<File
RelativePath="..\..\src\libm\k_sin.c"
>
</File>
<File
RelativePath="..\..\src\libm\math.h"
>
</File>
<File
RelativePath="..\..\src\libm\math_private.h"
>
</File>
<File
RelativePath="..\..\src\video\mmx.h"
>
</File>
<File
RelativePath="..\..\src\libm\s_copysign.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_cos.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_fabs.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_floor.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_scalbn.c"
>
</File>
<File
RelativePath="..\..\src\libm\s_sin.c"
>
</File>
<File
RelativePath="..\..\src\SDL.c"
>
......@@ -548,6 +592,10 @@
RelativePath="..\..\src\video\SDL_glfuncs.h"
>
</File>
<File
RelativePath="..\..\src\haptic\SDL_haptic.c"
>
</File>
<File
RelativePath="..\..\src\stdlib\SDL_iconv.c"
>
......@@ -728,6 +776,14 @@
RelativePath="..\..\src\events\SDL_sysevents.h"
>
</File>
<File
RelativePath="..\..\src\haptic\win32\SDL_syshaptic.c"
>
</File>
<File
RelativePath="..\..\src\haptic\SDL_syshaptic.h"
>
</File>
<File
RelativePath="..\..\src\joystick\SDL_sysjoystick.h"
>
......
......@@ -29,6 +29,8 @@
#include "SDL_audio.h"
#include "SDL_audio_c.h"
#include "../libm/math.h"
//#define DEBUG_CONVERT
/* These are fractional multiplication routines. That is, their inputs
......@@ -1352,6 +1354,7 @@ SDL_BuildAudioTypeCVT(SDL_AudioCVT * cvt,
For now, use RBJ's cookbook coefficients. It might be more
optimal to create a Butterworth filter, but this is more difficult.
*/
#if 0
int
SDL_BuildIIRLowpass(SDL_AudioCVT * cvt, SDL_AudioFormat format)
{
......@@ -1443,7 +1446,10 @@ SDL_BuildIIRLowpass(SDL_AudioCVT * cvt, SDL_AudioFormat format)
SDL_memset(cvt->state_buf, 0, 4 * SDL_AUDIO_BITSIZE(format) / 4);
cvt->state_pos = 0;
#undef convert_fixed
return 0;
}
#endif
/* Apply the lowpass IIR filter to the given SDL_AudioCVT struct */
/* This was implemented because it would be much faster than the fir filter,
......@@ -1667,7 +1673,7 @@ SDL_BuildWindowedSinc(SDL_AudioCVT * cvt, SDL_AudioFormat format,
0.42f - 0.5f * cosf(two_pi_over_m * (float) i) +
0.08f * cosf(four_pi_over_m * (float) i);
}
norm_sum += fabs(fSinc[i]);
norm_sum += fSinc[i] < 0 ? -fSinc[i] : fSinc[i]; /* fabs(fSinc[i]); */
}
norm_fact = 1.0f / norm_sum;
......
......@@ -29,23 +29,6 @@
#include "../../joystick/SDL_sysjoystick.h" /* For the real SDL_Joystick */
#include "../../joystick/win32/SDL_dxjoystick_c.h" /* For joystick hwdata */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define DIRECTINPUT_VERSION 0x0700 /* Need at least DirectX 7 for dwStartDelay */
#include <dinput.h>
#include <dxerr8.h>
#ifdef _MSC_VER
# pragma comment (lib, "dinput8.lib")
# pragma comment (lib, "dxguid.lib")
# pragma comment (lib, "dxerr8.lib")
#endif /* _MSC_VER */
/* an ISO hack for VisualC++ */
#ifdef _MSC_VER
#define snprintf _snprintf
#endif /* _MSC_VER */
#define MAX_HAPTICS 32
......@@ -122,8 +105,11 @@ static BOOL CALLBACK DI_EffectCallback(LPCDIEFFECTINFO pei, LPVOID pv);
static void
DI_SetError(const char *str, HRESULT err)
{
/*
SDL_SetError("Haptic: %s - %s: %s", str,
DXGetErrorString8A(err), DXGetErrorDescription8A(err));
*/
SDL_SetError("Haptic error %s", str);
}
......
This diff is collapsed.
......@@ -37,15 +37,8 @@
#include <windows.h>
#define DIRECTINPUT_VERSION 0x0700 /* Need version 7 for force feedback. */
#define INITGUID
#include <dinput.h>
#ifdef _MSC_VER
/* Used for the c_dfDIJoystick2 symbol (no imports are used) */
# pragma comment (lib, "dinput.lib")
#endif
#include <dxerr8.h>
#ifdef _MSC_VER
# pragma comment (lib, "dxerr8.lib")
#endif
#define MAX_INPUTS 256 /* each joystick can have up to 256 inputs */
......
......@@ -25,6 +25,8 @@
#include <math.h>
#else
/* Math routines from uClibc: http://www.uclibc.org */
extern double __ieee754_log(double x);
extern double __ieee754_pow(double x, double y);
extern double __ieee754_sqrt(double x);
......
......@@ -24,6 +24,8 @@
#define libm_hidden_proto(x)
#define libm_hidden_def(x)
typedef unsigned int u_int32_t;
/* The original fdlibm code used statements like:
n0 = ((*(int*)&one)>>29)^1; * index of high word *
ix0 = *(n0+(int*)&x); * high word of x *
......
......@@ -81,7 +81,7 @@ libm_hidden_proto(floor)
i0 += 1;
else {
j = i1 + (1 << (52 - j0));
if (j < i1)
if (j < (u_int32_t)i1)
i0 += 1; /* got a carry */
i1 = j;
}
......
......@@ -638,6 +638,33 @@ RETZERO:
/* *INDENT-ON* */
}
void
__declspec(naked)
_allshr()
{
/* *INDENT-OFF* */
__asm {
cmp cl,40h
jae RETZERO
cmp cl,20h
jae MORE32
shrd eax,edx,cl
sar edx,cl
ret
MORE32:
mov eax,edx
xor edx,edx
and cl,1Fh
sar eax,cl
ret
RETZERO:
xor eax,eax
xor edx,edx
ret
}
/* *INDENT-ON* */
}
void
__declspec(naked)
_aullshr()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment