update to sdl-1.2.12. long due update, possible now since the macppc
X acceleration bug is now gone (thanks for ajacoutot for endless testing of this issue), diff from brad
This commit is contained in:
parent
4646366869
commit
4967057365
@ -1,11 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.55 2007/09/16 02:53:13 merdely Exp $
|
||||
# Uses pthreads
|
||||
# $OpenBSD: Makefile,v 1.56 2007/09/22 01:12:38 pvalchev Exp $
|
||||
|
||||
COMMENT= cross-platform multimedia library
|
||||
|
||||
VERSION= 1.2.9
|
||||
VERSION= 1.2.12
|
||||
DISTNAME= SDL-${VERSION}
|
||||
PKGNAME= ${DISTNAME:L}p7
|
||||
PKGNAME= ${DISTNAME:L}
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://www.libsdl.org/
|
||||
@ -28,13 +27,12 @@ FLAVORS= sun esd arts aa caca no_x11
|
||||
FLAVOR?= sun
|
||||
|
||||
USE_LIBTOOL= Yes
|
||||
MODULES= converters/libiconv
|
||||
|
||||
AUTOCONF_VERSION= 2.59
|
||||
AUTOMAKE_VERSION= 1.9
|
||||
SEPARATE_BUILD= concurrent
|
||||
CONFIGURE_STYLE= autoconf
|
||||
CONFIGURE_STYLE= gnu
|
||||
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC} ${WRKSRC}/test
|
||||
SHARED_LIBS= SDL 7.0
|
||||
SHARED_LIBS= SDL 8.0
|
||||
CONFIGURE_ENV+= X11BASE="${X11BASE}" \
|
||||
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
||||
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
|
||||
@ -100,7 +98,7 @@ CONFIGURE_ARGS+= --without-x \
|
||||
--disable-video-x11
|
||||
.else
|
||||
USE_X11= Yes
|
||||
WANTLIB+= X11.>=10 Xau Xdmcp Xext
|
||||
WANTLIB+= X11.>=10 Xau Xdmcp Xext Xrandr Xrender
|
||||
.endif
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
@ -1,10 +1,10 @@
|
||||
MD5 (SDL-1.2.9.tar.gz) = gJGe9VZCX/gqhVX/QKV5oA==
|
||||
MD5 (SDL-1.2.12.tar.gz) = VEtFVJhuUe7W00Q1z5xfPw==
|
||||
MD5 (patch-libsd1.2.7-libcaca0.9.diff) = 3/bPX8l0lNvgWICGbhUWYA==
|
||||
RMD160 (SDL-1.2.9.tar.gz) = n67tqc+PZJorUG6dt8XO20USz+c=
|
||||
RMD160 (SDL-1.2.12.tar.gz) = OHECPGPqBW66Q85PVe6NOnP/MCI=
|
||||
RMD160 (patch-libsd1.2.7-libcaca0.9.diff) = 50oezoZFd7b9r4UWqeS0AJWOV1s=
|
||||
SHA1 (SDL-1.2.9.tar.gz) = gUDeAOc8zb3uGW+o/ZlS3bPMdfE=
|
||||
SHA1 (SDL-1.2.12.tar.gz) = LDf/FoM2g2nA9VXUp0LwVEFTYQ0=
|
||||
SHA1 (patch-libsd1.2.7-libcaca0.9.diff) = Tk0/XwKG5pYODlza0vkMVJl6bAQ=
|
||||
SHA256 (SDL-1.2.9.tar.gz) = 1aFoloBRU2ZBq1o7pfwjQ4NRHHeovFzri+1hm91C5fk=
|
||||
SHA256 (SDL-1.2.12.tar.gz) = 33friD79zGEiDq963jgyRinCc8J4zo1wClUwNp6bbfk=
|
||||
SHA256 (patch-libsd1.2.7-libcaca0.9.diff) = fnf1KYlqBfccSHTtjR9npVtt976i2zFrClxN/ejoAS8=
|
||||
SIZE (SDL-1.2.9.tar.gz) = 2688179
|
||||
SIZE (SDL-1.2.12.tar.gz) = 2829456
|
||||
SIZE (patch-libsd1.2.7-libcaca0.9.diff) = 28259
|
||||
|
12
devel/sdl/patches/patch-Makefile_in
Normal file
12
devel/sdl/patches/patch-Makefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.3 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- Makefile.in.orig Sat Sep 8 22:26:45 2007
|
||||
+++ Makefile.in Sat Sep 8 22:27:31 2007
|
||||
@@ -48,7 +48,7 @@ LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
-LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
+LT_LDFLAGS = -no-undefined -rpath $(DESTDIR)$(libdir) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
|
||||
|
26
devel/sdl/patches/patch-configure
Normal file
26
devel/sdl/patches/patch-configure
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-configure,v 1.15 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- configure.orig Sat Sep 8 22:38:20 2007
|
||||
+++ configure Sat Sep 8 22:39:50 2007
|
||||
@@ -25672,9 +25672,6 @@ echo "${ECHO_T}$CompileNASM_ret" >&6
|
||||
win32)
|
||||
NASMFLAGS="-f win32"
|
||||
;;
|
||||
- openbsd)
|
||||
- NASMFLAGS="-f aoutb"
|
||||
- ;;
|
||||
macosx)
|
||||
NASMFLAGS="-f macho"
|
||||
;;
|
||||
@@ -33307,10 +33304,10 @@ _ACEOF
|
||||
;;
|
||||
netbsd|openbsd)
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
-#define SDL_AUDIO_DRIVER_BSD 1
|
||||
+#define SDL_AUDIO_DRIVER_SUNAUDIO 1
|
||||
_ACEOF
|
||||
|
||||
- SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
|
||||
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
||||
have_audio=yes
|
||||
;;
|
||||
aix)
|
@ -1,84 +0,0 @@
|
||||
$OpenBSD: patch-configure_in,v 1.28 2007/07/20 05:23:41 jakemsr Exp $
|
||||
--- configure.in.orig Sat Aug 27 23:31:18 2005
|
||||
+++ configure.in Sun Jul 8 01:07:57 2007
|
||||
@@ -535,9 +535,6 @@ CheckNASM()
|
||||
win32)
|
||||
NASMFLAGS="-f win32"
|
||||
;;
|
||||
- openbsd)
|
||||
- NASMFLAGS="-f aoutb"
|
||||
- ;;
|
||||
*)
|
||||
NASMFLAGS="-f elf"
|
||||
;;
|
||||
@@ -1082,9 +1079,6 @@ CheckOpenGL()
|
||||
AC_MSG_RESULT($video_opengl)
|
||||
if test x$video_opengl = xyes; then
|
||||
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
||||
- if test x$use_dlopen != xyes; then
|
||||
- AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
|
||||
- fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -1105,9 +1099,6 @@ CheckOpenGLQNX()
|
||||
if test x$video_opengl = xyes; then
|
||||
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
||||
SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
|
||||
- if test x$use_dlopen != xyes; then
|
||||
- AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS", AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl"))
|
||||
- fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -1680,6 +1671,9 @@ CheckDLOPEN()
|
||||
AC_ARG_ENABLE(sdl-dlopen,
|
||||
[ --enable-sdl-dlopen use dlopen for shared object loading [default=yes]],
|
||||
, enable_sdl_dlopen=yes)
|
||||
+ AC_ARG_ENABLE(ltdl,
|
||||
+[ --enable-ltdl use libtool for shared object loading [default=no]],
|
||||
+ , enable_ltdl=yes)
|
||||
if test x$enable_sdl_dlopen = xyes; then
|
||||
AC_MSG_CHECKING(for dlopen)
|
||||
use_dlopen=no
|
||||
@@ -1691,7 +1685,7 @@ CheckDLOPEN()
|
||||
])
|
||||
AC_MSG_RESULT($use_dlopen)
|
||||
|
||||
- if test x$use_dlopen = xyes; then
|
||||
+ if test x$use_dlopen = xyes -a x$enable_ltdl = xyes; then
|
||||
CFLAGS="$CFLAGS -DUSE_DLOPEN"
|
||||
AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS",
|
||||
AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl",
|
||||
@@ -2115,9 +2109,9 @@ case "$target" in
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
- CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
|
||||
- AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
|
||||
- AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
|
||||
+ CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
||||
+ AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
||||
+ AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
||||
fi
|
||||
# OpenBSD needs linking with ossaudio emulation library
|
||||
if test x$have_oss = xyes; then
|
||||
@@ -2764,6 +2758,9 @@ if test "x$enable_rpath" = "xyes"; then
|
||||
else
|
||||
SDL_RLD_FLAGS=""
|
||||
fi
|
||||
+if test $ARCH = openbsd -a x$enable_video_x11 = xyes; then
|
||||
+ SDL_RLD_FLAGS="-L${X11BASE}/lib"
|
||||
+fi
|
||||
|
||||
case "$ARCH" in
|
||||
openbsd | netbsd | bsdi)
|
||||
@@ -2797,7 +2794,7 @@ esac
|
||||
STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
|
||||
|
||||
dnl Output the video drivers we use
|
||||
-if test x$enable_video = xtrue; then
|
||||
+if test x$enable_video = xyes; then
|
||||
if test "$VIDEO_SUBDIRS" = ""; then
|
||||
AC_MSG_ERROR(*** No video drivers are enabled!)
|
||||
fi
|
16
devel/sdl/patches/patch-sdl-config_in
Normal file
16
devel/sdl/patches/patch-sdl-config_in
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-sdl-config_in,v 1.5 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- sdl-config.in.orig Sat Sep 8 22:28:00 2007
|
||||
+++ sdl-config.in Sat Sep 8 22:29:07 2007
|
||||
@@ -42,10 +42,10 @@ while test $# -gt 0; do
|
||||
echo @SDL_VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
- echo -I@includedir@/SDL @SDL_CFLAGS@
|
||||
+ echo -I@includedir@ -I@includedir@/SDL @SDL_CFLAGS@
|
||||
;;
|
||||
@ENABLE_SHARED_TRUE@ --libs)
|
||||
-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@
|
||||
+@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ @X_LIBS@
|
||||
@ENABLE_SHARED_TRUE@ ;;
|
||||
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs)
|
||||
@ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs)
|
@ -1,11 +0,0 @@
|
||||
$OpenBSD: patch-src_Makefile_in,v 1.11 2006/10/19 00:26:34 pvalchev Exp $
|
||||
--- src/Makefile.in.orig Sun Aug 28 00:31:37 2005
|
||||
+++ src/Makefile.in Sat Sep 10 20:34:34 2005
|
||||
@@ -306,7 +306,6 @@ lib_LTLIBRARIES = libSDL.la
|
||||
libSDL_la_SOURCES = $(GENERAL_SRCS)
|
||||
libSDL_la_LDFLAGS = \
|
||||
-no-undefined \
|
||||
- -release $(LT_RELEASE) \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
|
||||
libSDL_la_LIBADD = \
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_SDL_fatal_c,v 1.3 2006/10/19 00:26:34 pvalchev Exp $
|
||||
--- src/SDL_fatal.c.orig Tue Nov 12 23:20:24 2002
|
||||
+++ src/SDL_fatal.c Tue Nov 12 23:22:35 2002
|
||||
@@ -72,9 +72,6 @@ static void SDL_Parachute(int sig)
|
||||
signal(sig, SIG_DFL);
|
||||
print_msg("Fatal signal: ");
|
||||
switch (sig) {
|
||||
- case SIGSEGV:
|
||||
- print_msg("Segmentation Fault");
|
||||
- break;
|
||||
#ifdef SIGBUS
|
||||
#if SIGBUS != SIGSEGV
|
||||
case SIGBUS:
|
||||
@@ -109,7 +106,6 @@ static void SDL_Parachute(int sig)
|
||||
}
|
||||
|
||||
static int SDL_fatal_signals[] = {
|
||||
- SIGSEGV,
|
||||
#ifdef SIGBUS
|
||||
SIGBUS,
|
||||
#endif
|
@ -1,25 +1,24 @@
|
||||
$OpenBSD: patch-src_audio_SDL_audio_c,v 1.11 2007/08/14 15:51:07 naddy Exp $
|
||||
--- src/audio/SDL_audio.c.orig Fri Sep 17 15:20:10 2004
|
||||
+++ src/audio/SDL_audio.c Tue Aug 14 16:41:43 2007
|
||||
@@ -467,8 +467,9 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
|
||||
$OpenBSD: patch-src_audio_SDL_audio_c,v 1.12 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- src/audio/SDL_audio.c.orig Fri Jul 20 01:52:10 2007
|
||||
+++ src/audio/SDL_audio.c Sat Sep 8 21:39:59 2007
|
||||
@@ -518,8 +518,9 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
|
||||
|
||||
/* See if we need to do any conversion */
|
||||
if ( obtained != NULL ) {
|
||||
- memcpy(obtained, &audio->spec, sizeof(audio->spec));
|
||||
- SDL_memcpy(obtained, &audio->spec, sizeof(audio->spec));
|
||||
- } else if ( desired->freq != audio->spec.freq ||
|
||||
+ memcpy(obtained, desired, sizeof(audio->spec));
|
||||
+ SDL_memcpy(obtained, desired, sizeof(audio->spec));
|
||||
+ }
|
||||
+ if ( desired->freq != audio->spec.freq ||
|
||||
desired->format != audio->spec.format ||
|
||||
desired->channels != audio->spec.channels ) {
|
||||
/* Build an audio conversion block */
|
||||
@@ -481,7 +482,8 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
|
||||
@@ -532,7 +533,7 @@ int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpe
|
||||
return(-1);
|
||||
}
|
||||
if ( audio->convert.needed ) {
|
||||
- audio->convert.len = desired->size;
|
||||
- audio->convert.len = (int) ( ((double) desired->size) /
|
||||
+ audio->convert.len = (int) ( ((double) audio->spec.size) /
|
||||
+ audio->convert.len_ratio );
|
||||
audio->convert.len_ratio );
|
||||
audio->convert.buf =(Uint8 *)SDL_AllocAudioMem(
|
||||
audio->convert.len*audio->convert.len_mult);
|
||||
if ( audio->convert.buf == NULL ) {
|
||||
|
12
devel/sdl/patches/patch-src_audio_bsd_SDL_bsdaudio_c
Normal file
12
devel/sdl/patches/patch-src_audio_bsd_SDL_bsdaudio_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_audio_bsd_SDL_bsdaudio_c,v 1.1 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- src/audio/bsd/SDL_bsdaudio.c.orig Sat Sep 8 22:34:02 2007
|
||||
+++ src/audio/bsd/SDL_bsdaudio.c Sat Sep 8 22:34:34 2007
|
||||
@@ -292,7 +292,7 @@ OBSD_Status(_THIS)
|
||||
info.blocksize,
|
||||
info.hiwat, info.lowat,
|
||||
(info.mode == AUMODE_PLAY) ? "PLAY"
|
||||
- : (info.mode = AUMODE_RECORD) ? "RECORD"
|
||||
+ : (info.mode == AUMODE_RECORD) ? "RECORD"
|
||||
: (info.mode == AUMODE_PLAY_ALL ? "PLAY_ALL"
|
||||
: "?"));
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
$OpenBSD: patch-src_audio_openbsd_SDL_openbsdaudio_c,v 1.8 2007/07/20 05:23:41 jakemsr Exp $
|
||||
--- src/audio/openbsd/SDL_openbsdaudio.c.orig Sun Jan 4 08:49:15 2004
|
||||
+++ src/audio/openbsd/SDL_openbsdaudio.c Sat Jul 7 19:05:13 2007
|
||||
@@ -262,21 +262,21 @@ OBSD_Status(_THIS)
|
||||
return;
|
||||
}
|
||||
|
||||
- fprintf(stderr,"
|
||||
-[play/record info]
|
||||
-buffer size : %d bytes
|
||||
-sample rate : %i Hz
|
||||
-channels : %i
|
||||
-precision : %i-bit
|
||||
-encoding : 0x%x
|
||||
-seek : %i
|
||||
-sample count : %i
|
||||
-EOF count : %i
|
||||
-paused : %s
|
||||
-error occured : %s
|
||||
-waiting : %s
|
||||
-active : %s
|
||||
-",
|
||||
+ fprintf(stderr,"\n"
|
||||
+"[play/record info]\n"
|
||||
+"buffer size : %d bytes\n"
|
||||
+"sample rate : %i Hz\n"
|
||||
+"channels : %i\n"
|
||||
+"precision : %i-bit\n"
|
||||
+"encoding : 0x%x\n"
|
||||
+"seek : %i\n"
|
||||
+"sample count : %i\n"
|
||||
+"EOF count : %i\n"
|
||||
+"paused : %s\n"
|
||||
+"error occured : %s\n"
|
||||
+"waiting : %s\n"
|
||||
+"active : %s\n"
|
||||
+"",
|
||||
info.play.buffer_size,
|
||||
info.play.sample_rate,
|
||||
info.play.channels,
|
||||
@@ -290,19 +290,19 @@ active : %s
|
||||
info.play.waiting ? "yes" : "no",
|
||||
info.play.active ? "yes": "no");
|
||||
|
||||
- fprintf(stderr,"
|
||||
-[audio info]
|
||||
-monitor_gain : %i
|
||||
-hw block size : %d bytes
|
||||
-hi watermark : %i
|
||||
-lo watermark : %i
|
||||
-audio mode : %s
|
||||
-",
|
||||
+ fprintf(stderr,"\n"
|
||||
+"[audio info]\n"
|
||||
+"monitor_gain : %i\n"
|
||||
+"hw block size : %d bytes\n"
|
||||
+"hi watermark : %i\n"
|
||||
+"lo watermark : %i\n"
|
||||
+"audio mode : %s\n"
|
||||
+"",
|
||||
info.monitor_gain,
|
||||
info.blocksize,
|
||||
info.hiwat, info.lowat,
|
||||
(info.mode == AUMODE_PLAY) ? "PLAY"
|
||||
- : (info.mode = AUMODE_RECORD) ? "RECORD"
|
||||
+ : (info.mode == AUMODE_RECORD) ? "RECORD"
|
||||
: (info.mode == AUMODE_PLAY_ALL ? "PLAY_ALL"
|
||||
: "?"));
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
$OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp $
|
||||
--- src/audio/sun/SDL_sunaudio.c.orig Sun Jan 4 08:49:15 2004
|
||||
+++ src/audio/sun/SDL_sunaudio.c Sun Aug 12 02:43:22 2007
|
||||
@@ -32,7 +32,7 @@ static char rcsid =
|
||||
$OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.4 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- src/audio/sun/SDL_sunaudio.c.orig Fri Jul 20 01:52:10 2007
|
||||
+++ src/audio/sun/SDL_sunaudio.c Sat Sep 8 22:23:18 2007
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
-#ifdef __NetBSD__
|
||||
+#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
-#ifdef __NETBSD__
|
||||
+#if defined(__NETBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/audioio.h>
|
||||
#endif
|
||||
@@ -141,12 +141,19 @@ void CheckUnderflow(_THIS)
|
||||
@@ -135,12 +135,19 @@ void CheckUnderflow(_THIS)
|
||||
void DSP_WaitAudio(_THIS)
|
||||
{
|
||||
#ifdef AUDIO_GETINFO
|
||||
@ -32,7 +32,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
if ( left > fragsize ) {
|
||||
Sint32 sleepy;
|
||||
|
||||
@@ -221,9 +228,22 @@ void DSP_PlayAudio(_THIS)
|
||||
@@ -214,9 +221,22 @@ void DSP_PlayAudio(_THIS)
|
||||
#ifdef DEBUG_AUDIO
|
||||
CheckUnderflow(this);
|
||||
#endif
|
||||
@ -56,7 +56,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
}
|
||||
written += fragsize;
|
||||
}
|
||||
@@ -251,7 +271,10 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -244,7 +264,10 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
{
|
||||
char audiodev[1024];
|
||||
#ifdef AUDIO_SETINFO
|
||||
@ -67,7 +67,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
#endif
|
||||
int desired_freq = spec->freq;
|
||||
|
||||
@@ -266,16 +289,34 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -259,16 +282,34 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
case 8: { /* Unsigned 8 bit audio data */
|
||||
spec->format = AUDIO_U8;
|
||||
#ifdef AUDIO_SETINFO
|
||||
@ -103,7 +103,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -294,10 +335,128 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -287,10 +328,128 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
AUDIO_INITINFO(&info); /* init all fields to "no change" */
|
||||
|
||||
/* Try to set the requested settings */
|
||||
@@ -306,8 +465,25 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -299,8 +458,25 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
info.play.precision = (enc == AUDIO_ENCODING_ULAW)
|
||||
? 8 : spec->format & 0xff;
|
||||
info.play.encoding = enc;
|
||||
@ -260,7 +260,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
/* Check to be sure we got what we wanted */
|
||||
if(ioctl(audio_fd, AUDIO_GETINFO, &info) < 0) {
|
||||
SDL_SetError("Error getting audio parameters: %s",
|
||||
@@ -324,13 +500,34 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -317,13 +493,34 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
}
|
||||
|
||||
switch(enc) {
|
||||
@ -296,7 +296,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
/* linear 16bit didn't work either, resort to µ-law */
|
||||
enc = AUDIO_ENCODING_ULAW;
|
||||
spec->channels = 1;
|
||||
@@ -349,6 +546,9 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -342,6 +539,9 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
#endif /* AUDIO_SETINFO */
|
||||
written = 0;
|
||||
|
||||
@ -306,7 +306,7 @@ $OpenBSD: patch-src_audio_sun_SDL_sunaudio_c,v 1.3 2007/08/14 15:51:07 naddy Exp
|
||||
/* We can actually convert on-the-fly to U-Law */
|
||||
if ( ulaw_only ) {
|
||||
spec->freq = desired_freq;
|
||||
@@ -361,8 +561,14 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
@@ -354,8 +554,14 @@ int DSP_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
}
|
||||
spec->channels = 1;
|
||||
} else {
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_joystick_bsd_SDL_sysjoystick_c,v 1.9 2007/07/20 05:23:41 jakemsr Exp $
|
||||
--- src/joystick/bsd/SDL_sysjoystick.c.orig Fri Nov 12 13:24:46 2004
|
||||
+++ src/joystick/bsd/SDL_sysjoystick.c Sat Jul 7 18:07:10 2007
|
||||
@@ -60,7 +60,7 @@ static char rcsid =
|
||||
#include <sys/joystick.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__))
|
||||
#include <machine/joystick.h>
|
||||
#endif
|
||||
|
||||
@@ -370,7 +370,7 @@ SDL_SYS_JoystickUpdate(SDL_Joystick *joy)
|
||||
int nbutton, naxe = -1;
|
||||
Sint32 v;
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__OpenBSD__) && defined(__i386__))
|
||||
struct joystick gameport;
|
||||
static int x, y, xmin = 0xffff, ymin = 0xffff, xmax = 0, ymax = 0;
|
||||
|
@ -1,12 +0,0 @@
|
||||
$OpenBSD: patch-src_timer_linux_SDL_systimer_c,v 1.3 2006/12/04 03:52:08 jolan Exp $
|
||||
--- src/timer/linux/SDL_systimer.c.orig Sun Jan 4 10:49:19 2004
|
||||
+++ src/timer/linux/SDL_systimer.c Mon Nov 27 10:42:12 2006
|
||||
@@ -55,7 +55,7 @@ static char rcsid =
|
||||
/* Linux select() changes its timeout parameter upon return to contain
|
||||
the remaining time. Most other unixen leave it unchanged or undefined. */
|
||||
#define SELECT_SETS_REMAINING
|
||||
-#elif defined(__bsdi__) || defined(__FreeBSD__) || defined(__sun)
|
||||
+#elif defined(__bsdi__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__)
|
||||
#define USE_NANOSLEEP
|
||||
#endif
|
||||
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.11 2006/10/19 00:26:34 pvalchev Exp $
|
||||
--- src/video/x11/SDL_x11gl.c.orig Fri Dec 17 16:35:24 2004
|
||||
+++ src/video/x11/SDL_x11gl.c Fri Dec 17 16:35:36 2004
|
||||
@@ -38,7 +38,7 @@ static char rcsid =
|
||||
/* IRIX doesn't have a GL library versioning system */
|
||||
#define DEFAULT_OPENGL "libGL.so"
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11gl_c,v 1.12 2007/09/22 01:12:38 pvalchev Exp $
|
||||
--- src/video/x11/SDL_x11gl.c.orig Fri Jul 20 01:52:25 2007
|
||||
+++ src/video/x11/SDL_x11gl.c Sat Sep 8 23:37:43 2007
|
||||
@@ -34,7 +34,7 @@
|
||||
#elif defined(__QNXNTO__)
|
||||
#define DEFAULT_OPENGL "libGL.so.3"
|
||||
#elif defined(__OpenBSD__)
|
||||
-#define DEFAULT_OPENGL "libGL.so.4.0"
|
||||
+#define DEFAULT_OPENGL "libGL.so.5.1"
|
||||
#else
|
||||
-#define DEFAULT_OPENGL "libGL.so.1"
|
||||
+#define DEFAULT_OPENGL "libGL.so.4.0"
|
||||
#define DEFAULT_OPENGL "libGL.so.1"
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_multisample
|
||||
|
@ -1,171 +0,0 @@
|
||||
$OpenBSD: patch-src_video_x11_SDL_x11modes_c,v 1.8 2007/07/20 05:23:41 jakemsr Exp $
|
||||
--- src/video/x11/SDL_x11modes.c.orig Fri Nov 12 13:25:42 2004
|
||||
+++ src/video/x11/SDL_x11modes.c Sat Jul 7 18:07:10 2007
|
||||
@@ -44,6 +44,8 @@ static char rcsid =
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) (a > b ? a : b)
|
||||
+#define V_INTERLACE 0x010
|
||||
+#define V_DBLSCAN 0x020
|
||||
|
||||
#ifdef XFREE86_VM
|
||||
Bool SDL_NAME(XF86VidModeGetModeInfo)(Display *dpy, int scr, SDL_NAME(XF86VidModeModeInfo) *info)
|
||||
@@ -92,6 +94,82 @@ static int cmpmodes(const void *va, const void *vb)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef XFREE86_VM
|
||||
+static int get_vidmode_filter(SDL_NAME(XF86VidModeModeInfo) **modes, int nmodes, char **bitmap)
|
||||
+{
|
||||
+ int i, result = 0;
|
||||
+ int use_all_modes, use_specific_mode;
|
||||
+ const char *variable;
|
||||
+ char *temp;
|
||||
+
|
||||
+ if (!nmodes)
|
||||
+ return 0;
|
||||
+
|
||||
+ temp = (char *)malloc((nmodes)*sizeof(char));
|
||||
+ if (!temp)
|
||||
+ return 0;
|
||||
+
|
||||
+ for ( i = 0; i < nmodes; ++i )
|
||||
+ temp[i] = 0;
|
||||
+
|
||||
+ variable = getenv("SDL_VIDEO_X11_USE_ALL_MODES");
|
||||
+ use_all_modes = variable ? atoi(variable) : 0;
|
||||
+ variable = getenv("SDL_VIDEO_X11_USE_SPECIFIC_MODE");
|
||||
+ use_specific_mode = variable ? atoi(variable) : 0;
|
||||
+
|
||||
+ qsort(modes, nmodes, sizeof *modes, cmpmodes);
|
||||
+
|
||||
+ if ( use_all_modes ) {
|
||||
+ for ( i = 0; i < nmodes; ++i )
|
||||
+ temp[i] = 1;
|
||||
+ result = 1;
|
||||
+/* } else if ( use_specific_mode ) { ... */
|
||||
+ } else {
|
||||
+ int previous_refresh, current_refresh;
|
||||
+ SDL_NAME(XF86VidModeModeInfo) *previous, *current;
|
||||
+
|
||||
+ previous = modes[0];
|
||||
+ previous_refresh = (int)(previous->dotclock * 1000.0 /
|
||||
+ (previous->htotal * previous->vtotal));
|
||||
+ if ( previous->flags & V_INTERLACE ) previous_refresh *= 2;
|
||||
+ else if ( previous->flags & V_DBLSCAN ) previous_refresh /= 2;
|
||||
+
|
||||
+ temp[0] = 1;
|
||||
+ for ( i = 1; i < nmodes; ++i ) {
|
||||
+ current = modes[i];
|
||||
+ current_refresh = (int)(current->dotclock * 1000.0 /
|
||||
+ (current->htotal * current->vtotal));
|
||||
+ if ( current->flags & V_INTERLACE ) current_refresh *= 2;
|
||||
+ else if ( current->flags & V_DBLSCAN ) current_refresh /= 2;
|
||||
+
|
||||
+ /* Compare this mode to the previous one */
|
||||
+ if ( current->hdisplay == previous->hdisplay &&
|
||||
+ current->vdisplay == previous->vdisplay ) {
|
||||
+#ifdef XFREE86_DEBUG
|
||||
+ printf("Comparing %dx%d at %d Hz and %d Hz\n",
|
||||
+ current->hdisplay, current->vdisplay,
|
||||
+ current_refresh, previous_refresh);
|
||||
+#endif
|
||||
+ if ( current_refresh > previous_refresh ) {
|
||||
+ temp[i-1] = 0;
|
||||
+ temp[i] = 1;
|
||||
+ }
|
||||
+ else
|
||||
+ temp[i] = 0;
|
||||
+ }
|
||||
+ else
|
||||
+ temp[i] = 1;
|
||||
+
|
||||
+ previous = current;
|
||||
+ previous_refresh = current_refresh;
|
||||
+ }
|
||||
+ result = 1;
|
||||
+ }
|
||||
+ *bitmap = temp;
|
||||
+ return result;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static void get_real_resolution(_THIS, int* w, int* h);
|
||||
|
||||
static void set_best_resolution(_THIS, int width, int height)
|
||||
@@ -103,9 +181,11 @@ static void set_best_resolution(_THIS, int width, int
|
||||
int i;
|
||||
int best_width = 0, best_height = 0;
|
||||
int nmodes;
|
||||
+ char *bitmap;
|
||||
|
||||
if ( SDL_NAME(XF86VidModeGetModeLine)(SDL_Display, SDL_Screen, &i, &mode) &&
|
||||
- SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display,SDL_Screen,&nmodes,&modes)){
|
||||
+ SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display,SDL_Screen,&nmodes,&modes) &&
|
||||
+ get_vidmode_filter(modes, nmodes, &bitmap) ){
|
||||
#ifdef XFREE86_DEBUG
|
||||
printf("Available modes (unsorted):\n");
|
||||
for ( i = 0; i < nmodes; ++i ) {
|
||||
@@ -117,14 +197,16 @@ static void set_best_resolution(_THIS, int width, int
|
||||
#endif
|
||||
for ( i = 0; i < nmodes ; i++ ) {
|
||||
if ( (modes[i]->hdisplay == width) &&
|
||||
- (modes[i]->vdisplay == height) )
|
||||
+ (modes[i]->vdisplay == height) &&
|
||||
+ (bitmap[i] == 1) )
|
||||
goto match;
|
||||
}
|
||||
qsort(modes, nmodes, sizeof *modes, cmpmodes);
|
||||
for ( i = nmodes-1; i > 0 ; i-- ) {
|
||||
if ( ! best_width ) {
|
||||
if ( (modes[i]->hdisplay >= width) &&
|
||||
- (modes[i]->vdisplay >= height) ) {
|
||||
+ (modes[i]->vdisplay >= height) &&
|
||||
+ (bitmap[i] == 1) ) {
|
||||
best_width = modes[i]->hdisplay;
|
||||
best_height = modes[i]->vdisplay;
|
||||
}
|
||||
@@ -142,6 +224,7 @@ static void set_best_resolution(_THIS, int width, int
|
||||
SDL_NAME(XF86VidModeSwitchToMode)(SDL_Display, SDL_Screen, modes[i]);
|
||||
}
|
||||
XFree(modes);
|
||||
+ if (bitmap) free(bitmap);
|
||||
}
|
||||
}
|
||||
#endif /* XFREE86_VM */
|
||||
@@ -289,6 +372,7 @@ int X11_GetVideoModes(_THIS)
|
||||
int vm_major, vm_minor;
|
||||
int nmodes;
|
||||
SDL_NAME(XF86VidModeModeInfo) **modes;
|
||||
+ char *bitmap = (char*)0;
|
||||
#endif
|
||||
#ifdef HAVE_XIGXME
|
||||
int xme_major, xme_minor;
|
||||
@@ -350,7 +434,8 @@ int X11_GetVideoModes(_THIS)
|
||||
}
|
||||
}
|
||||
if ( ! buggy_X11 &&
|
||||
- SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) {
|
||||
+ SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) &&
|
||||
+ get_vidmode_filter(modes, nmodes, &bitmap) ) {
|
||||
|
||||
#ifdef XFREE86_DEBUG
|
||||
printf("Available modes: (sorted)\n");
|
||||
@@ -369,6 +454,9 @@ int X11_GetVideoModes(_THIS)
|
||||
for ( i=0; i<nmodes; ++i ) {
|
||||
int w, h;
|
||||
|
||||
+ /* Exclude those vidmodes that have been filtered out */
|
||||
+ if (!bitmap[i]) continue;
|
||||
+
|
||||
/* Check to see if we should add the screen size (Xinerama) */
|
||||
w = modes[i]->hdisplay;
|
||||
h = modes[i]->vdisplay;
|
||||
@@ -401,6 +489,7 @@ int X11_GetVideoModes(_THIS)
|
||||
SDL_modelist[n] = NULL;
|
||||
}
|
||||
XFree(modes);
|
||||
+ if (bitmap) free(bitmap);
|
||||
|
||||
use_vidmode = vm_major * 100 + vm_minor;
|
||||
save_mode(this);
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.11 2006/10/19 00:26:34 pvalchev Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.12 2007/09/22 01:12:38 pvalchev Exp $
|
||||
bin/sdl-config
|
||||
include/SDL/
|
||||
include/SDL/SDL.h
|
||||
@ -6,7 +6,7 @@ include/SDL/SDL_active.h
|
||||
include/SDL/SDL_audio.h
|
||||
include/SDL/SDL_byteorder.h
|
||||
include/SDL/SDL_cdrom.h
|
||||
include/SDL/SDL_copying.h
|
||||
include/SDL/SDL_config.h
|
||||
include/SDL/SDL_cpuinfo.h
|
||||
include/SDL/SDL_endian.h
|
||||
include/SDL/SDL_error.h
|
||||
@ -21,8 +21,10 @@ include/SDL/SDL_mouse.h
|
||||
include/SDL/SDL_mutex.h
|
||||
include/SDL/SDL_name.h
|
||||
include/SDL/SDL_opengl.h
|
||||
include/SDL/SDL_platform.h
|
||||
include/SDL/SDL_quit.h
|
||||
include/SDL/SDL_rwops.h
|
||||
include/SDL/SDL_stdinc.h
|
||||
include/SDL/SDL_syswm.h
|
||||
include/SDL/SDL_thread.h
|
||||
include/SDL/SDL_timer.h
|
||||
@ -34,6 +36,8 @@ include/SDL/close_code.h
|
||||
lib/libSDL.a
|
||||
lib/libSDL.la
|
||||
lib/libSDLmain.a
|
||||
lib/pkgconfig/
|
||||
lib/pkgconfig/sdl.pc
|
||||
@man man/man3/SDLKey.3
|
||||
@man man/man3/SDL_ActiveEvent.3
|
||||
@man man/man3/SDL_AddTimer.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user