Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
IRIX patches from Andrea Suatoni
  • Loading branch information
slouken committed Mar 6, 2003
1 parent 7a8dd49 commit 1bae4e9
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
14 changes: 11 additions & 3 deletions configure.in
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/audio/dmedia/SDL_irixaudio.c
Expand Up @@ -129,7 +129,7 @@ static void AL_CloseAudio(_THIS)
mixbuf = NULL;
}
if ( audio_port != NULL ) {
ALcloseport(audio_port);
alClosePort(audio_port);
audio_port = NULL;
}
}
Expand Down Expand Up @@ -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 ) {
Expand Down
4 changes: 4 additions & 0 deletions src/audio/nas/SDL_nasaudio.h
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions src/video/x11/SDL_x11image.c
Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions test/testoverlay.c
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -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++)
{
Expand Down Expand Up @@ -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++)
{
Expand Down

0 comments on commit 1bae4e9

Please sign in to comment.