mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-03 08:40:50 +00:00
IRIX patches from Andrea Suatoni
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40606
This commit is contained in:
parent
bb0214c5a3
commit
205a296adf
14
configure.in
14
configure.in
@ -415,14 +415,22 @@ CheckNAS()
|
||||
have_nas=no
|
||||
if test -r /usr/X11R6/include/audio/audiolib.h; then
|
||||
have_nas=yes
|
||||
fi
|
||||
AC_MSG_RESULT($have_nas)
|
||||
if test x$have_nas = xyes; then
|
||||
CFLAGS="$CFLAGS -DNAS_SUPPORT"
|
||||
SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
|
||||
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
|
||||
AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
|
||||
|
||||
dnl On IRIX, the NAS includes are in a different directory,
|
||||
dnl and libnas must be explicitly linked in
|
||||
|
||||
elif test -r /usr/freeware/include/nas/audiolib.h; then
|
||||
have_nas=yes
|
||||
CFLAGS="$CFLAGS -DNAS_SUPPORT"
|
||||
SYSTEM_LIBS="$SYSTEM_LIBS -lnas -lXt"
|
||||
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
|
||||
AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
|
||||
fi
|
||||
AC_MSG_RESULT($have_nas)
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ static void AL_CloseAudio(_THIS)
|
||||
mixbuf = NULL;
|
||||
}
|
||||
if ( audio_port != NULL ) {
|
||||
ALcloseport(audio_port);
|
||||
alClosePort(audio_port);
|
||||
audio_port = NULL;
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||
(alSetWidth(audio_config, width) >= 0) &&
|
||||
(alSetQueueSize(audio_config, spec->samples*2) >= 0) &&
|
||||
(alSetChannels(audio_config, spec->channels) >= 0) ) {
|
||||
audio_port = ALopenport("SDL audio", "w", audio_config);
|
||||
audio_port = alOpenPort("SDL audio", "w", audio_config);
|
||||
}
|
||||
alFreeConfig(audio_config);
|
||||
if( audio_port == NULL ) {
|
||||
|
@ -32,7 +32,11 @@ static char rcsid =
|
||||
#ifndef _SDL_nasaudio_h
|
||||
#define _SDL_nasaudio_h
|
||||
|
||||
#ifdef __sgi
|
||||
#include <nas/audiolib.h>
|
||||
#else
|
||||
#include <audio/audiolib.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#include "SDL_sysaudio.h"
|
||||
|
||||
|
@ -168,6 +168,8 @@ static int num_CPU(void)
|
||||
}
|
||||
fclose(pstat);
|
||||
}
|
||||
#elif defined(__sgi)
|
||||
num_cpus = sysconf(_SC_NPROC_ONLN);
|
||||
#elif defined(_SC_NPROCESSORS_ONLN)
|
||||
/* number of processors online (SVR4.0MP compliant machines) */
|
||||
num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
@ -92,7 +92,7 @@ ConvertRGBtoYV12(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||
/* Convert */
|
||||
for(y=0; y<s->h && y<o->h; y++)
|
||||
{
|
||||
p=s->pixels+s->pitch*y;
|
||||
p=((Uint8 *) s->pixels)+s->pitch*y;
|
||||
op[0]=o->pixels[0]+o->pitches[0]*y;
|
||||
op[1]=o->pixels[1]+o->pitches[1]*(y/2);
|
||||
op[2]=o->pixels[2]+o->pitches[2]*(y/2);
|
||||
@ -132,7 +132,7 @@ ConvertRGBtoIYUV(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||
/* Convert */
|
||||
for(y=0; y<s->h && y<o->h; y++)
|
||||
{
|
||||
p=s->pixels+s->pitch*y;
|
||||
p=((Uint8 *) s->pixels)+s->pitch*y;
|
||||
op[0]=o->pixels[0]+o->pitches[0]*y;
|
||||
op[1]=o->pixels[1]+o->pitches[1]*(y/2);
|
||||
op[2]=o->pixels[2]+o->pitches[2]*(y/2);
|
||||
@ -164,7 +164,7 @@ ConvertRGBtoUYVY(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||
|
||||
for(y=0; y<s->h && y<o->h; y++)
|
||||
{
|
||||
p=s->pixels+s->pitch*y;
|
||||
p=((Uint8 *) s->pixels)+s->pitch*y;
|
||||
op=o->pixels[0]+o->pitches[0]*y;
|
||||
for(x=0; x<s->w && x<o->w; x++)
|
||||
{
|
||||
@ -197,7 +197,7 @@ ConvertRGBtoYVYU(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||
|
||||
for(y=0; y<s->h && y<o->h; y++)
|
||||
{
|
||||
p=s->pixels+s->pitch*y;
|
||||
p=((Uint8 *) s->pixels)+s->pitch*y;
|
||||
op=o->pixels[0]+o->pitches[0]*y;
|
||||
for(x=0; x<s->w && x<o->w; x++)
|
||||
{
|
||||
@ -233,7 +233,7 @@ ConvertRGBtoYUY2(SDL_Surface *s, SDL_Overlay *o, int monochrome, int luminance)
|
||||
|
||||
for(y=0; y<s->h && y<o->h; y++)
|
||||
{
|
||||
p=s->pixels+s->pitch*y;
|
||||
p=((Uint8 *) s->pixels)+s->pitch*y;
|
||||
op=o->pixels[0]+o->pitches[0]*y;
|
||||
for(x=0; x<s->w && x<o->w; x++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user