mirror of https://github.com/encounter/SDL.git
Fixed mingw-w64 build
This commit is contained in:
parent
20dfda4489
commit
f964ce03b4
|
@ -24296,15 +24296,14 @@ $as_echo "#define SDL_JOYSTICK_DINPUT 1" >>confdefs.h
|
|||
$as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
|
||||
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
|
||||
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
|
@ -24367,7 +24366,7 @@ $as_echo "#define SDL_LOADSO_WINDOWS 1" >>confdefs.h
|
|||
else
|
||||
LIBUUID=-luuid
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
|
||||
# The Windows platform requires special setup
|
||||
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
|
||||
|
|
11
configure.in
11
configure.in
|
@ -3628,13 +3628,12 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
else
|
||||
AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
|
||||
fi
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
|
||||
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
|
||||
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
|
||||
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
|
||||
have_joystick=yes
|
||||
fi
|
||||
if test x$enable_haptic = xyes; then
|
||||
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
|
||||
|
@ -3683,7 +3682,7 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
|
|||
else
|
||||
LIBUUID=-luuid
|
||||
fi
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion $LIBUUID -static-libgcc"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc"
|
||||
# The Windows platform requires special setup
|
||||
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
|
||||
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
|
||||
|
|
|
@ -37,6 +37,7 @@ typedef LONG NTSTATUS;
|
|||
#endif
|
||||
|
||||
/* SDL C runtime functions */
|
||||
#include "../../SDL_internal.h"
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#define calloc SDL_calloc
|
||||
|
|
|
@ -162,9 +162,9 @@ static Uint32 crc32(Uint32 crc, const void *data, int count)
|
|||
|
||||
#undef DEFINE_GUID
|
||||
#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
|
||||
DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
|
||||
DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
|
||||
DEFINE_GUID(IID_IAudioEndpointVolume, 0x5CDF2C82, 0x841E, 0x4546, 0x97, 0x22, 0x0C, 0xF7, 0x40, 0x78, 0x22, 0x9A);
|
||||
DEFINE_GUID(SDL_CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
|
||||
DEFINE_GUID(SDL_IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
|
||||
DEFINE_GUID(SDL_IID_IAudioEndpointVolume, 0x5CDF2C82, 0x841E, 0x4546, 0x97, 0x22, 0x0C, 0xF7, 0x40, 0x78, 0x22, 0x9A);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -179,7 +179,7 @@ static float GetSystemVolume(void)
|
|||
IMMDeviceEnumerator *pEnumerator;
|
||||
|
||||
/* This should gracefully fail on XP and succeed on everything Vista and above */
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &IID_IMMDeviceEnumerator, (LPVOID*)&pEnumerator);
|
||||
hr = CoCreateInstance(&SDL_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &SDL_IID_IMMDeviceEnumerator, (LPVOID*)&pEnumerator);
|
||||
if (SUCCEEDED(hr)) {
|
||||
IMMDevice *pDevice;
|
||||
|
||||
|
@ -187,7 +187,7 @@ static float GetSystemVolume(void)
|
|||
if (SUCCEEDED(hr)) {
|
||||
IAudioEndpointVolume *pEndpointVolume;
|
||||
|
||||
hr = IMMDevice_Activate(pDevice, &IID_IAudioEndpointVolume, CLSCTX_ALL, NULL, (LPVOID*)&pEndpointVolume);
|
||||
hr = IMMDevice_Activate(pDevice, &SDL_IID_IAudioEndpointVolume, CLSCTX_ALL, NULL, (LPVOID*)&pEndpointVolume);
|
||||
if (SUCCEEDED(hr)) {
|
||||
IAudioEndpointVolume_GetMasterVolumeLevelScalar(pEndpointVolume, &volume);
|
||||
IUnknown_Release(pEndpointVolume);
|
||||
|
|
Loading…
Reference in New Issue