OS/2 port!

This was mostly, if not entirely, written by "Doodle" and "Caetano":
    doodle@scenergy.dfmk.hu
    daniel@caetano.eng.br

--ryan.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401193
This commit is contained in:
Ryan C. Gordon 2005-11-23 07:29:56 +00:00
parent c154edb92f
commit b08452cb40
49 changed files with 6571 additions and 8 deletions

View file

@ -38,6 +38,12 @@ static char rcsid =
#include "SDL_audiomem.h"
#include "SDL_sysaudio.h"
#ifdef __OS2__
// We'll need the DosSetPriority() API!
#define INCL_DOSPROCESS
#include <os2.h>
#endif
/* Available audio drivers */
static AudioBootStrap *bootstrap[] = {
#ifdef OPENBSD_AUDIO_SUPPORT
@ -107,6 +113,9 @@ static AudioBootStrap *bootstrap[] = {
#endif
#ifdef DRENDERER_SUPPORT
&DRENDERER_bootstrap,
#endif
#ifdef __OS2__
&DART_bootstrap,
#endif
NULL
};
@ -181,6 +190,16 @@ int SDL_RunAudio(void *audiop)
D(bug("Entering audio loop...\n"));
#endif
#ifdef __OS2__
// Increase the priority of this thread to make sure that
// the audio will be continuous all the time!
#ifdef USE_DOSSETPRIORITY
#ifdef DEBUG_BUILD
printf("[SDL_RunAudio] : Setting priority to ForegroundServer+0! (TID%d)\n", SDL_ThreadID());
#endif
DosSetPriority(PRTYS_THREAD, PRTYC_FOREGROUNDSERVER, 0, 0);
#endif
#endif
/* Loop, filling the audio buffers */
while ( audio->enabled ) {
@ -248,6 +267,11 @@ int SDL_RunAudio(void *audiop)
D(bug("CloseAudio..Done, subtask exiting...\n"));
audio_configured = 0;
#endif
#ifdef __OS2__
#ifdef DEBUG_BUILD
printf("[SDL_RunAudio] : Task exiting. (TID%d)\n", SDL_ThreadID());
#endif
#endif
return(0);
}